Bollinger band coding help please

Forums ProRealTime English forum ProOrder support Bollinger band coding help please

Viewing 11 posts - 1 through 11 (of 11 total)
  • #80880

    Can somebody please program a strategy for me?

    I am looking to input a variable level for a buy trade outside the lower exponential Bollinger band (20, 2) (open). So, when the price moves a set amount below the Bollinger band it triggers a buy trade.

    When the buy is triggered its puts a stop loss in of the same value. I.e.: I input a variable of 40 and when the price goes below the exponential Bollinger band (20, 2) (open) by 40 pips it triggers a buy trade with a stop loss level 40 pips below that.

    And to have a target profit of 75% of the stop loss

    Also,

    I am looking to input a variable level for a sell trade outside the upper exponential Bollinger band (20, 2) (open) so, when the price moves a set amount above the Bollinger band it triggers a sell trade.

    When the sell is triggered its puts a stop loss in of the same value. I.e.: I input a variable of 40 and when the price goes above the exponential Bollinger band (20,2) (open) by 40 pips it triggers a sell trade with a stop loss level 40 pips above that.

    And to have a target profit of 75% of the stop loss

    I need to be able to adjust the variable amount that the trade triggers by please.

     

    I have this at the moment for sells trades and it seems to work?

    And this for buys and it doesnt work correctly

    Any ideas where I am going wrong and how do I put them together to work on 1 code?

    Regards,

     

    Gary

    #80882

    To write code, please use the <> “insert PRT code” button to make code easier to read. Thank you.

    Moreover this is not an indicator, but a strategy, so I will move the topic to ProOrder Support.

    #80886

    Replace line 5 of the second strategy with:

     

    #80887

    The two combined:

     

    #80893

    Thank you Roberto

     

    #80956

    Does anybody know if there a way to take half profits at a certain level and then to bring the other half of the stoploss down so the trade becomes a break even trade at worst?

    #80958

    At present ProOrder does not support partial closures (I think it is possible for manual trading, but I never tried). It is said to be supported in a future upgrade of the platform.

     

    #80959

    This is an example of how to put an order to breakeven when price reached x% of the takeprofit value, and close part of the position at the same time:

     

    2 users thanked author for this post.
    #91739

    This is also a strategy I wish to use but I don’t know how to add the code into PRT.

    Can you point me in the right direction to where it explains how to add code please.

    Also how do you control the size of the order which will decrease as the stop loss increases or is this obvious once the code is added?

    Many thanks

    Stuart

    #91763

    @wsmurray

    Look at the ProRealTime YouTube playlist about trading systems: https://www.youtube.com/playlist?list=PLGw_ZtCHrQ9gkYd50s9qd49uzyqxcK8gE

    #92356

    I know this should be easy but I am struggling to put it all together. Any help much appreciated?

Viewing 11 posts - 1 through 11 (of 11 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login