Strategia intraday ProBacktest: breakout del massimo precedente

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #260152 quote
    Filippo v.
    Participant
    New

     Buongiorno, sono un principiante.

    Vorrei imparare a programmare il probacktest.

    La mia idea di trading è la seguente: vorrei comprare quando il prezzo supera il massimo della candela precedente e chiudere alla chiusura della candela stessa. Tutto in intraday.

    Ho provato così (

    DEFPARAM CumulateOrders = False
    
    IF NOT LongOnMarket THEN
    BUY 1 CONTRATTO AT DHigh(1) STOP
    ENDIF
    
    IF LongOnMarket THEN
    SELL AT dclose(0) stop
    ENDIF
    

    ma funziona solo su alcune candele. Su altre candele, anche se il prezzo supera il massimo della candela precedente, il backtest non lo registra.

    Qualcuno può dirmi come fare?

    Grazie mille in anticipo.

    #260170 quote
    Nicolas
    Keymaster
    Master

    È possibile utilizzare questo metodo per attivare un ordine al prezzo massimo giornaliero precedente e chiuderlo a fine giornata (modificando l’ora di chiusura desiderata nell’istruzione DEFPARAM FlatAfter).

    DEFPARAM CumulateOrders = False
    DEFPARAM FlatAfter = 220000
    
    // Entry: buy if price breaks above the previous candle's high
    IF NOT LongOnMarket and close<Dhigh(1) THEN
      BUY 1 CONTRACT AT Dhigh(1) STOP
    ENDIF
    
    robertogozzi thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Strategia intraday ProBacktest: breakout del massimo precedente


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
Filippo v. @filippov Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Nicolas
1 day, 8 hours ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 04/12/2026
Status: Active
Attachments: No files
Logo Logo
Loading...