Please, remind me how backest works on v10 and v11

Viewing 15 posts - 16 through 30 (of 32 total)
  • Author
    Posts
  • #112137 quote
    robertogozzi
    Moderator
    Master

    Results from the strategy and the indicators match perfectly.

    x-4.jpg x-4.jpg
    #112151 quote
    pieroim
    Participant
    Average

    Results from the strategy and the indicators match perfectly.

    well, I’m sure it works well, the code is good. Why doesn’t work on my Prorealtime?

    #112153 quote
    pieroim
    Participant
    Average

    I have changed instrument and time

    What do you mean by changed time? Roberto is suggesting that you are using custom trading hours where candles are missing from your chart but are still used in indicator calculation If you have just switched to a different time frame then this is not what he meant.

    If you see the attached pictures you see that I’m not speaking of TF..

    #112164 quote
    Nicolas
    Keymaster
    Master

    Right click on your chart window and check what did you set as custom market hours. If you had changed it, set back to default, and display the weekend data too.

    #112165 quote
    robertogozzi
    Moderator
    Master

    @pieroim

    before going ahead posting always the same question, read carefully all posts and answer my question, please! (actually there was no question mark!!!)

    I wrote “from Sept. 20th through Sept. 24th you only see 3 candlesticks, while there are 4, tallying sunday“, where does this difference come from ?

    #112169 quote
    pieroim
    Participant
    Average

    Hi Nicolas,

    I never have changed the the configuration, I have installed the v11 from 5 days and I have changed nothing in the configuration, it is all at the default, it is a new installation with only active Future live data of CME. Prorealtime data. Nothing else.

    Roberto, I have changed the financial instrument to EURUSD (only days because I not have the real time data  of it in my package)  only to facilitate you to find the problem.. and I find the problem in a wrong calc when the backtest is applied, and ONLY in BACKTEST.

    I insert again, I also entered it yesterday, the default configuration on EURUSD .. as you can see nothing has been changed.

    Plese, SEE IT.

    proreal-str5-1.jpg proreal-str5-1.jpg
    #112174 quote
    robertogozzi
    Moderator
    Master

    I have no idea about the behaviour on v11, since I am not using it.

    Maybe Nicolas will be of greater help.

    #112180 quote
    Nicolas
    Keymaster
    Master

    Did you try with a “defparam preloadbars=0” at the top of the strategy code?

    #112182 quote
    pieroim
    Participant
    Average

    defparam preloadbars=0”

    It does not work..

    Defparam preloadbars=0
    Defparam cumulateorders=false
    
    if Barindex < 2 then
    BU = Close
    else
    BU = BU[1]-BU[2]/3.414+(1/3.414)*Close
    endif
    
    if barindex>PP then
    Signal = BU
    Noise = Close
    SigmaSignal = STD[PP](Signal)
    SigmaNoise = STD[PP](Noise)
    a = SigmaSignal/SigmaNoise
    n = (2/a)-1
    
    if n < 1 then
    nn = 1
    else
    nn = n
    endif
    
    MB = ExponentialAverage[nn](Close)
    endif
    
    cl=(MB>BU)
    cs=(MB<BU)
    
    GRAPH MB coloured (0,0,255) as "cl"
    GRAPH BU coloured (255,0,0) as "cs"
    
    if NOT LongOnMarket AND cl THEN
    BUY 1 CONTRACTS AT MARKET
    endif
    
    if NOT ShortOnMarket AND cs THEN
    SELLSHORT 1 CONTRACTS AT MARKET
    endif
    
    proreal-str6.jpg proreal-str6.jpg
    #112194 quote
    Nicolas
    Keymaster
    Master

    Ok, you are right, the problem comes with the exponentialaverage instruction, it doesn’t compute correctly. I will make a technical report, please do it also with a link to this thread.

    In the meantime, I coded the EMA with its formula and it works now correctly:

    Defparam preloadbars=0
    Defparam cumulateorders=false
    
    pp=17
    
    if Barindex < 2 then
    BU = Close
    else
    BU = BU[1]-BU[2]/3.414+(1/3.414)*Close
    endif
    
    if barindex>PP then
    Signal = BU
    Noise = Close
    SigmaSignal = STD[PP](Signal)
    SigmaNoise = STD[PP](Noise)
    a = SigmaSignal/SigmaNoise
    n = (2/a)-1
    
    if n < 1 then
    nn = 1
    else
    nn = n
    endif
    
    //MB = ExponentialAverage[nn](Close)
    EMALength = nn
    alpha = 2/(EMALength+1)
    CustomEMA = alpha*Close + (1-alpha)*CustomEMA[1]
    MB=CustomEMA
    
    endif
    
    cl=(MB>BU)
    cs=(MB<BU)
    
    
    if NOT LongOnMarket AND cl THEN
    BUY 1 CONTRACTS AT MARKET
    endif
    
    if NOT ShortOnMarket AND cs THEN
    SELLSHORT 1 CONTRACTS AT MARKET
    endif
    
    GRAPH MB coloured (0,0,255) as "cl"
    GRAPH BU coloured (255,0,0) as "cs"
    //graph n
    
    #112211 quote
    pieroim
    Participant
    Average

    Great Nicolas! Ok, I’ll send it.

    #112216 quote
    pieroim
    Participant
    Average

    Hi Nicolas,

    I think there’s still something wrong … see the pictures: mini Nasdaq100 full1219

    I have the same, identical problem with eurusd..

    Defparam preloadbars=0
    Defparam cumulateorders=false
     
    pp=17
     
    if Barindex < 2 then
    BU = Close
    else
    BU = BU[1]-BU[2]/3.414+(1/3.414)*Close
    endif
     
    if barindex>PP then
    Signal = BU
    Noise = Close
    SigmaSignal = STD[PP](Signal)
    SigmaNoise = STD[PP](Noise)
    a = SigmaSignal/SigmaNoise
    n = (2/a)-1
     
    if n < 1 then
    nn = 1
    else
    nn = n
    endif
     
    //MB = ExponentialAverage[nn](Close)
    EMALength = nn
    alpha = 2/(EMALength+1)
    CustomEMA = alpha*Close + (1-alpha)*CustomEMA[1]
    MB=CustomEMA
    endif
     
    cl=(MB>BU)
    cs=(MB<BU)
     
     
    if NOT LongOnMarket AND cl THEN
    BUY 1 CONTRACTS AT MARKET
    endif
     
    if NOT ShortOnMarket AND cs THEN
    SELLSHORT 1 CONTRACTS AT MARKET
    endif
     
    GRAPH MB coloured (0,0,255) as "cl"
    GRAPH BU coloured (255,0,0) as "cs"
    proreal-str7.jpg proreal-str7.jpg proreal-str9.jpg proreal-str9.jpg
    #112248 quote
    Nicolas
    Keymaster
    Master

    Yes because the code wait for 17 bars to begin the calculation. So you should also include the trading instructions in the same IF/ENDIF block (move line 31 to 44).

    #112260 quote
    pieroim
    Participant
    Average

    Thank’s Nicolas..

    I’ll do some tests in the afternoon and I’ll let you know.

    Meanwhile, I sent a ticket to technical support to report the problem .. but instead of focusing on the problem, they sent me an email telling me that I am an IG customer and therefore it is not their responsibility to solve the problem .. BHA!

    Anyway, I answered earlier that version 10 was with IG, an account that had been abandoned for about 2 years, while v11 was not!

    We hope that this time they will focus more on the probable bug in v11 than on bureaucratic issues that are of little interest to traders.

    However I have indicated the link to this discussion .. I hope they come to read it ..

    #112262 quote
    Nicolas
    Keymaster
    Master

    Seems normal that a company don’t supply support for someone who is not their customer? 😉

Viewing 15 posts - 16 through 30 (of 32 total)
  • You must be logged in to reply to this topic.

Please, remind me how backest works on v10 and v11


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
pieroim @pieroim Participant
Summary

This topic contains 31 replies,
has 4 voices, and was last updated by Nicolas
6 years, 2 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 11/04/2019
Status: Active
Attachments: 12 files
Logo Logo
Loading...