using candles to define stops

Forums ProRealTime English forum ProOrder support using candles to define stops

Viewing 3 posts - 1 through 3 (of 3 total)
  • #84654

    hi

    I’m trying to figure out how to use candles to define the initial stop as well as the exit.  I have attached what I have coded so far, which runs though doesn’t quite capture what I am trying to do.

    For long positions, the initial stop would be the low of the opening candle or previous candle and for short positions the stop would be the high of the opening candle or previous candle.

    For long positions, the exit is a stop order below a bull candle with a body > 50% ATR and for short positions, the exit is a stop order above a bear candle with a body >50% ATR.  The obvious problem is the stop order expires after the close of the following candle – is there some way to keep the stop at that level? I have done the video training on loops though am not yet experienced or smart enough to figure it out 🙂

    Any tips or suggestions greatly appreciated,

    cheers

    Chris

     

    #84656
    Leo

    Hi. when the condition, make a variable than save the barindex of the crossing. Like CrossingPosition=barindex

    Then make another condition for decide how many bars after crossing you still wanted tho open trades. Like: lowest[5](conditionToTrade)=1

    Then set the set stoploss at low[barindex-CrossingPosition]

    Keep learning! That’s the most important thing.

    1 user thanked author for this post.
    #84681

    One suggestion, try to avoid using +-0.0001, since it is instrument dependent, use

    instead and let ProOrder do the math.

    Between lines 13 and 14 insert the following

    then replace line 14 with

    do the same at line 28 with high[0].
    This will save your SL values, they will only be overwritten when conditions at line 12 and 26 will be true again.

     

     

    1 user thanked author for this post.
Viewing 3 posts - 1 through 3 (of 3 total)

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