Breakout Strategy on the candle stick – please Help!!

Forums ProRealTime English forum ProBuilder support Breakout Strategy on the candle stick – please Help!!

Viewing 14 posts - 1 through 14 (of 14 total)
  • #62467

    Hi Nicolas and all,

    I have creates a simple breakout strategy.. which triggers on the 1 hour chart.. when the 3am candle stick closed it will put an buy stop order 10 pips above the highest high of that 3am candle.. please see below!!

    it will only trigger if the next candle reach 10pips above the highs? but if 5th candle reach the buy stop order it wont trigger?? please if anyone can help get this sorted?

    aslo how can i add a Stoploss 10pips below the low on the 3am candle??

    please help!!

    #62491

    Your condition is only true once. So the strategy will place a stop order that is always valid for one bar. If you want it to be active longer you have to repeat the order.

    1 user thanked author for this post.
    #62529

    thanks but how can i repeat the order? and add a Stoploss 10pips below the low on the 3am candle??

    #62584

    Move ENDIF from line 20 to line 7.

    #62586

    I suggest this modified code

     

     

    #62591

    hi Roberto,

    Thanks once again for your attention! i have tried to change abit..

    Entryprice should be 10 pips above the high of 3am candle and should work as a stop order lets say if 6 am candle goes higher and the entryprice should be still 10pips high of that 3 am candle high!!

    10pip higher the high of 3am is the entry and 10pip below the low of 3am is stoploss!!

     

     

    #62592

    It should work!

    #62627

    seems like it give the Stoploss just the low of the candle.. i have change  StopLoss = range + (20 * pipsize) which gives the right Stoploss!! it will enter perfect at the entryprice but it aslo get another two entries randomly.. not sure why?

    please see pic below:

     

    #62636

    My fault, just change line 7 so that it reads

    this should work also with 10 pips offset, rather than 20.

    #62867

    Hi Roberto..

    I have manage to get pretty much the right entry and the stoploss.. thanks. i have change the time period 3am to 9am to trigger..

    so for this now i have added to go short if short triggered.. please if you be kind enough to check below code if its correct? i have attached pic on GBPUSD.. please if you can check this on GBPUSD would be great!!!

    the idea is.. if long triggered the short order should cancel automatically and also if short triggered the long order should cancel.. is this possible??

     

     

    #63221

    ?

     

    #63252

    It’s not possible to cancel pending order. Since they last only 1 period, the only way for them to get out from market is to wait 1 bar.

    #63272

    ah ok!! if i remove the tradingtime will that mean.. it will trigger any time after 3am.. will it trigger only once either way? its seems like if it gets trigger to go long and the stop loss or the profit target hit with in 3am and 9am.. it will place another order to go long for some reason? any reason why?

     

     

    #63284

    ah ok!! if i remove the tradingtime will that mean.. it will trigger any time after 3am… will it trigger only once either way? its seems like if it gets trigger to go long and the stop loss or the profit target hit with in 3am and 9am.. it will place another order to go long for some reason? any reason why?

    No, it will trigger at all time, after 3am and before 3am the following day, then new values will be assigned to variables.
    It may be triggered either ways (and that may happen more than once either way) as long as the Entry prices are hit.

    If you only want to enter ONCE, no matter which direction, then you just have to clear VALUE and VALUE1 when OnMarket.

    If, instead, you want to enter ONCE per direction, then you just have to clear VALUE when LongOnMarket and VALUE1 when ShortOnMarket.

    But it may happen that the trade is opened and closed within the same candle… then you can only tell a trade had been entered by comparing STRATEGYPROFIT at each candlestick. If the two values are not identical, you may assume a trade has been entered and closed in one bar!

     

     

     

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

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