Backtest data issue

Forums ProRealTime English forum ProBuilder support Backtest data issue

Viewing 7 posts - 1 through 7 (of 7 total)
  • #195023

    Hi,

     

    I am new to PRT and have been back testing several strategies. I would like to understand which data the software uses to simulate the trades. Here an example. I created a very simple Algo where the the system should go long or short depending the direction of 2 indicator lines crossing each other. I am using a 1 hour time frame and I am also using a 25 point trailing stop loss which protects the loss amount and also is the target. All trades are opened and closed exactly on the hour in the back test (please also explain this to me if possible). How does the system calculate at which price the Stop loss is activated?

    #195027

    Hi there !

    Without looking at your code, it is a bit difficult to guess what your issue is, assuming you have one. And explaining “all” is not possible. If you show your code (preferably by means of the blue button if it is visible (otherwise bad luck) and tell what you expect of it vs what you see happening, you hopefully will receive decent answers ?

    Peter

    PS: If you click on the attachment below, you will see that blue button I referred to.

    #195034

    hi Peter,

    i poste the code on the other thread…

    #195041

    hey,

    I have attached a screenshot of what I mean. How does back test calculate the trailing stop Loss? If I use tick data does it actually calculate exactly how the market moved even if I am using 1 hour candlesticks and testing 1 hour.

    thanks!

    #195049

    If you use tick data, the backtest will check on all inferior timeframes when exactly the stoploss is triggered.

    1 user thanked author for this post.
    #195054

    Yes it does. It is only that in Backtest you will see the Exit at the 1 hour level, while in reality it happened “underway” (like at 10:50 while you see that it happened on 11:00).

    See that little green triangle ? that is where the trade happened in reality – thus in-bar (you can see the pin of the bar through the vertical line).

    The second example shows live (this is the green triangle again) together with Backtest (brown). You can see a difference of less than a point (this is Nasdaq) between the two.

    2 users thanked author for this post.
    #195082

    hey, thanks a lot for that explanation!

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

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