AotoTrade not Triggering when backtest shows a trigger

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #250465 quote
    pdrh
    Participant
    Average

    Hi

    I have just started this algo on Autotrade on a 10 Sec TF  but the no trade was triggered when the backtest shows a trigger .

    Can anyone offer an explanation

    //————————————————————————-
    // Main code : ASX Daily close H/LV2.4(1)
    //————————————————————————-
    defparam cumulateorders = false
    DEFPARAM FLATBEFORE = 080000
    DEFPARAM FLATAFTER = 172900
    DM=0//Month=6//no trade for June
    If Month=MM and currentdayofweek=DW then
    NT=1
    else
    NT=0
    endif
    Start=080000
    If time=start then
    BT=0
    ST=0
    Flg=0
    RT=0
    Endif
    noentrybeforetime=008000
    noentryaftertime=170000
    timeenterbefore=time>=noentrybeforetime
    timeenterafter=time IntradayBarIndex)
    //——————————————-
    if low[2] < low[3] AND high[1] > low[2] AND low < low[2] THEN buyTrigger = high[1] endif // === 1-2-3 HIGH REVERSAL SETUP (SHORT) === if high[2] > high[3] AND low[1] < high[2] AND high > high[2] THEN
    sellTrigger = low[1]
    endif
    If close crosses over buytrigger and ind1>ind2 and OTD and TW Then
    BUY N CONTRACT AT market
    BT=BT+1
    SL= lstp
    TP=ltgt
    Endif
    If close crosses under selltrigger and TW and ind1strategyprofit and RT<2then
    Flg=1
    if ind1
    strategyprofit and RT<2 then
    if ind1>ind2 then
    buy 2*N contracts at market
    RT=RT+1
    SL=lstp1
    TP=ltgt1
    MK2=MK2+1
    endif
    endif
    set stop ploss SL
    set Target Pprofit TP

    SCreenshot.jpg SCreenshot.jpg DAX1-2-3-Reversal-7-9-25-10Sec.itf
    #250470 quote
    pdrh
    Participant
    Average
    //-------------------------------------------------------------------------
    // Main code : ASX Daily close H/LV2.4(1)
    //-------------------------------------------------------------------------
    defparam cumulateorders = false
    DEFPARAM FLATBEFORE = 080000
    DEFPARAM FLATAFTER = 172900
    DM=0//Month=6//no trade for June
    If Month=MM and currentdayofweek=DW then
    NT=1
    else
    NT=0
    endif
    Start=080000
    If time=start then
    BT=0
    ST=0
    Flg=0
    RT=0
    Endif
    noentrybeforetime=008000
    noentryaftertime=170000
    timeenterbefore=time>=noentrybeforetime
    timeenterafter=time<noentryaftertime
    TW=timeenterbefore and timeenterafter and not DM and not NT
    ind1=EXPONENTIALAVERAGE[SP](close)
    ind2=EXPONENTIALAVERAGE[LP](close)
    N=0.5
    
    OTD = (Barindex - TradeIndex(1) > IntradayBarIndex)
    //-------------------------------------------
    if low[2] < low[3] AND high[1] > low[2] AND low < low[2] THEN
    buyTrigger = high[1]
    endif // === 1-2-3 HIGH REVERSAL SETUP (SHORT) ===
    if high[2] > high[3] AND low[1] < high[2] AND high > high[2] THEN
    sellTrigger = low[1]
    endif
    If close crosses over buytrigger and ind1>ind2  and OTD and TW  Then
    BUY N CONTRACT AT market
    BT=BT+1
    SL= lstp
    TP=ltgt
    Endif
    If close crosses under selltrigger and TW and ind1<ind2 and OTD then
    Sellshort N contracts At market
    ST=ST+1
    SL=sstp
    TP=stgt
    Endif
    If CurrentDayofweek=1 then
    M=2
    else
    M=1
    Endif
    If longonmarket[1] and not onmarket and strategyprofit[1]>strategyprofit and RT<2then
    Flg=1
    if ind1<ind2 and Flg=1then
    sellshort M*N contracts at market
    RT=RT+1
    SL=sstp1
    TP=stgt1
    MK=MK+1
    endif
    endif
    If shortonmarket[1] and not onmarket and strategyprofit[1]>strategyprofit and RT<2 then
    if ind1>ind2 then
    buy 2*N contracts at market
    RT=RT+1
    SL=lstp1
    TP=ltgt1
    MK2=MK2+1
    endif
    endif
    set stop ploss SL
    set Target Pprofit TP
    
    #250487 quote
    cjr30
    Participant
    Master

    Aunque no lo he mirado en profundidad, esta linea no esta incorrecta?
    noentrybeforetime=008000, no seria 080000

    robertogozzi and pdrh thanked this post
    #250488 quote
    robertogozzi
    Moderator
    Master
    #250503 quote
    GraHal
    Participant
    Master

    no trade was triggered

    Might it be due to Instrument changes which have been made over this last weekend re DAX, see this Topic …

    Algo stopped Position closed

    Iván González thanked this post
    #250534 quote
    Nicolas
    Keymaster
    Master

    Minimal order size? Try with 1 contract.

    Iván González thanked this post
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

AotoTrade not Triggering when backtest shows a trigger


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
pdrh @pdrh Participant
Summary

This topic contains 5 replies,
has 5 voices, and was last updated by Nicolas
5 months, 1 week ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 09/08/2025
Status: Active
Attachments: 2 files
Logo Logo
Loading...