Bug/feature/my mistake? Stoploss only moved after bar is closed and not realtime

Forums ProRealTime English forum ProOrder support Bug/feature/my mistake? Stoploss only moved after bar is closed and not realtime

Viewing 5 posts - 1 through 5 (of 5 total)
  • #18164

    Hi,

    Hope someone can assist/clarify this.

    When in a trade I use this code (on 5”DAX) to move my initial SL after my condition is valid.

    if longonmarket and close>C2+C3 then
    set stop ploss (c3* 0.5)

    I found that the stoploss is only moved/replaced AFTER the close of the 5” bar.
    For example:
    The condition to move the stoploss is valid at 14:21:34, but the initial stoploss is only cancelled/moved to new SL at 14:25:00 (I can see this in the order window).
    Even worse: When the condition to move the SL is valid, but the bar closes below the condition…then the SL is not moved at all…..
    My intention is to move the stoploss directly at 14:21:34 (when the condition is valid). At the moment it only moves the SL to its new level when the conditions are still valid at the close of the bar

    Why is the stoploss not replaced at 14:21:34 but only after the close of the bar?
    And thus, why is the SL not replaced at all when the condition was valid, but the close of the bar is lower than the set condition?
    Am I doing something wrong or is this a feature/bug in PRT?

    Also tested this live on demo in IG: same problem.

    Thanks in advance for any help.
     

     

    #18167

    This is a common question and well known behaviour of proorder : script is only read once per bar, not at each tick. So if you can trade this strategy in a lower timeframe, then you should have many more read of your codes. Otherwise, you’ll have to wait for the multi timeframe support to trade the strategy on a 1 sec timeframe with informations from an upper one.

    #18170

    How about targets? Is it same for targets? Candel need to close on or above target level?

    #18172

    thanks for you reply Nicolas,

    I am a bit (or extremely;-) confused now, cause i thought PRT 10.3 does support Multi Time Frame Support and tick by tick backtesting. When using 10.3 and backtesting, i get the same results: only if bar closes above valid conditions, the stoploss is moved. If price reaches conditions but bar closes below: SL is not moved.

    I know about the ‘backtesting problem’ in 10.2… But i thought the solution in 10.3 should have solved the problem i face at the moment. But as i understand now it’s not?

     

     

    #18174

    Well, if your condition “close>C2+C3” is not valid at bar close, the stoploss will never be changed, and that’s obvious. Since the code is only read and executed once, you’ll then have to wait for the next candle to test your conditions.

    The 10.3 version embed a new backtest engine (understand a fix of the old engine), not a new way of dealing with your codes and trades in real time.

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

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