Why is this strategy not well calculated? – solved

Forums ProRealTime English forum ProOrder support Why is this strategy not well calculated? – solved

Viewing 6 posts - 1 through 6 (of 6 total)
  • #48732

    Solved… a stupid mistake.. pardon..

    This is a very simple strategy for better understanding programming with PRT. But the backtest gives me strange results .. what I’m doing of wrong?

     

    #48760

    Not Solved… entrataAquisto would be on 1 in the picture…

    IF NOT ShortOnMarket THEN
         entrataVendita = 0
    ENDIF
    IF NOT LongOnMarket THEN
          entrataAquisto = 0
    ENDIF
    #48763

    If you have no long position opened, then ‘entrataAquisto’ is set to 0. This value is set at bar Close and only visible in next bars, so when you set it to 1, you will only see it, at first at next bar open.

    #48773

    Ok Nicolas, but in picture that I attached, you can see that the variable woud be to 1 in the bars after the bar where a long position is opened.

    The backtest in the graph gives me 0 valute..

    #48775

    I do not know what’s wrong, but maybe this is something that could help: create a boolean variable that use NOT SHORTONMARKET as its own test.

    #48806

    Thank’s Nicolas, very strange behavior of PRT backtest..

    However, your suggestion has led me to the solution..

    I replaced:

    simply with:

    Now all works great!

    Thank’s

    Piero

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

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