Ancora errore di entrata/uscita sul BackTest

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

    Ciao purtoppo mi trovo ancora ad avere il problema di mancata entrata sul backtest. Questa volta il codice è molto semplice ma continua a verificarsi il problema.

    Non riesco proprio a capire il perchè!

    Strumento: US Russell 2000 Cash ($10)

    TimeFrame: 20 ticks

    Unità: 1000

    Periodo: Tutto

    Spread:0.3

    Entrate non eseguite: 01/06/2020 06:04:51 , 01/06/2020 06:54:31 ,  01/06/2020 07:13:08

    MME1=ExponentialAverage[24](close)
    
    BOLLUP=BollingerUp[20](close)
    BOLLDOWN=BollingerDown[20](close)
    ATR=AverageTrueRange[14](close)
    
    
    ParMaxLoss=5
    ParMinLoss=1
    ParRR=1.5
    
    
    ValMaxLoss=ParMaxLoss*pipsize
    ValMinLoss=ParMinLoss*pipsize
    ValProfit=ParRR
    
    StatoPosizione=0
    
    
    DiffBollUp=ABS(BOLLUP[3]-Close[3])
    DiffBollDown=ABS(BOLLDOWN[3]-Close[3])
    DiffBoll=ABS(BOLLUP-BOLLDOWN)
    
    if 1=1 then
    
    l1=Open<MME1 and Close>MME1
    l2=DiffBollUp > DiffBollDown
    l3=Close[3]<MME1[3] and Close[2]<MME1[2] and Close[1]<MME1[1]
    l4=Open[3]<MME1[3] and Open[2]<MME1[2] and Open[1]<MME1[1]
    l5=DiffBoll>(ATR*3)
    
    if PositionLongOpen=0 and  l1 and l2 and l3 and l4 and l5 then
    
    ValPrezzoPosizioneLong=Close
    ValPrezzoStopLong = MIN(Low[1] , MIN(Low[2]  ,  Low[3]) )
    
    ValPuntiTP=ABS(ValPrezzoPosizioneLong-ValPrezzoStopLong)
    
    if ValPuntiTP<=ValMaxLoss and ValPuntiTP>=ValMinLoss then
    
    PositionLongOpen=1
    StatoPosizione=2
    
    ValTargetBreakEvenLong=ValPrezzoPosizioneLong+(ValPuntiTP*ValProfit)
    endif
    
    endif
    
    
    if PositionLongOpen=1 and Close<= ValPrezzoStopLong or PositionLongOpen=1 and Close>= ValTargetBreakEvenLong then
    
    
    if Close>ValPrezzoPosizioneLong then
    DRAWARROWUP(barindex,StatoPosizione-0.3)Coloured(0,255,0)
    else
    DRAWARROWUP(barindex,StatoPosizione-0.3)Coloured(255,0,0)
    endif
    
    
    
    ValPrezzoPosizioneLong=0
    ValTargetBreakEvenLong=0
    
    PositionLongOpen=0
    StatoPosizione=1
    
    endif
    
    
    endif
    
    Return StatoPosizione as "StatoPosizione"
    
    // Condizioni per entrare su posizioni long
    
    StatoPosizione= CALL ScalpingTicks
    
    ValContratti=2
    
    
    IF NOT LongOnMarket AND StatoPosizione=2 THEN
    BUY ValContratti CONTRACTS AT MARKET
    ENDIF
    
    // Condizioni per uscire da posizioni long
    If LongOnMarket AND StatoPosizione=1 THEN
    SELL AT MARKET
    ENDIF
    
    // Condizioni per entrare su posizioni short
    IF NOT ShortOnMarket AND StatoPosizione=-2 THEN
    SELLSHORT ValContratti CONTRACTS AT MARKET
    ENDIF
    
    // Condizioni per uscire da posizioni short
    IF ShortOnMarket AND StatoPosizione=-1 THEN
    EXITSHORT AT MARKET
    ENDIF
    
    Graph StatoPosizione
    
    
    
    Errori2.jpg Errori2.jpg ScalpingTicks.itf Sistema-Scalping-Ticks.itf
    #134023 quote
    cventurercventurer
    Participant
    Average

    Purtoppo ho anche notato che ci sono 2 entrate che non sono presenti nell’indicatore..

    01/06/2020 10:20:28

    01/06/2020 09:35:34

    #134037 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    ProOrder non consente l’esecuzione di strategie con grafici diversi da quelli a TEMPO, è strano che il backtest venga fatto!

    Non saprei, prova a chiedere all’assistenza premendo i tasti Ctrl+M dalla piattaforma.

    #134043 quote
    cventurercventurer
    Participant
    Average

    Interessante non mi era capitato di leggere questa cosa dei timeframe a tempo, grazie mille, provo ad applicare la stessa logica a timeframe 30 sec o inferiore.

    Grazie mille!!

    #134172 quote
    NicolasNicolas
    Keymaster
    Legend

    I backtest nei tempi delle zecche sono effettivamente possibili, ma non nel trading dal vivo.

    #134178 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Scusa la frase, quasi incomprensibile, di Nicolas, ma il traduttore Google traduce TICK in ZECCA, quindi “zecche” va inteso come TICKS.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Ancora errore di entrata/uscita sul BackTest


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
cventurer @cventurer Participant
Summary

This topic contains 5 replies,
has 3 voices, and was last updated by robertogozzirobertogozzi
6 years, 4 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 06/01/2020
Status: Active
Attachments: 3 files
ProRealCode ProRealCode
Loading...