Probacktest results issue: trade shows as triggered before hit entry price

Forums ProRealTime English forum ProOrder support Probacktest results issue: trade shows as triggered before hit entry price

Viewing 1 post (of 1 total)
  • #118544

    Hi there,

    I am having an issue with Probacktest.  Probacktest results issue: long trade shows as being triggered on results before it reaches defined long entry price.

     

    My strategy code only allows for one long and one short trade per day.

    In order to check if both orders were triggered by the same candle, I generated a verification code which includes long entry price +/- spread  (spread was defined as a variable in the code) – see below the verification code and the variables plotted on the cursor details window on the left-hand side of the chart.

    ProBacktest results show 3 trades for the 31st Dec (two long and one short). However, when debugging the code and checking the values of the variables, looking to validate if the high of the current candle is higher than the (longentry + spread), it shows the long entry price has not yet been reached; however the backtest results show it has been reached – even though there is a 0.2 difference in the values.

    Longentry = 28473.7

    Spread=1.2

    Longentry + spread = 28474.9

    High of the 13:00 candle = 28474.7       => therefore 0.2 smaller than longentry +spread)  but backtest shows a long entry on the 13:00 candle;

     

    In the verification part of the code (screenshot 3), if the high of the candle is higher than longentry + spread, then longTriggered = 1 (TRUE).

    Because the verification part of the code did not detect the long entry (there should not have been a long entry on the 13:00 candle, as the high is 0.2 smaller than longentry+spread price), the code allowed another long entry at 14:00.

    So my questions are:

    1. Is probacktest capable of dealing with decimal numbers or only integer numbers? – this is due to the 0.2 difference
    2. because there is a discrepancy between the calculation of the variables showed on the screen (see screenshot 2) and the probacktest results (screenshot 1) – which means the calculation logic is not the same for a) probacktest variables values calculation and b) probacktest results calculation. Why isn’t the calculation the same for both?

    Please help.

Viewing 1 post (of 1 total)

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