PROBLEMA SU TF 1 SECONDO

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #192309 quote
    GIULIO.BI
    Participant
    New

    Buongiorno Roberto,

    ho una strategia MTF che vorrei far girare su TF 1 secondo per cogliere il prezzo più vicino possibile all’attraversamento ma dal backtest riesco a farla girare solo a 1 minuto.

    Probabilmente dipende dai diversi timeframe, puoi controllare il codice per favore?

    Grazie.

    // Definizione dei parametri del codice
    DEFPARAM CumulateOrders = False // Posizioni cumulate disattivate
    
    Timeframe (2 h, updateonclose)
    ignored, indicator1 = CALL "PRT cambio tendenza/colore"
    c50 = (indicator1 < 0)
    
    Timeframe (1 h, updateonclose)
    ignored, indicator2 = CALL "PRT cambio tendenza/colore"
    c51 = (indicator2 < 0)
    
    Timeframe (30 minutes, updateonclose)
    indicator3 = RSI[9](close)
    c52 = (indicator3 > 20)
    
    Timeframe (15 minutes, updateonclose)
    indicator4 = RSI[9](close)
    c53 = (indicator4 > 20)
    
    Timeframe (default)
    c1 = (close CROSSES UNDER 1.050)
    c2 = (close CROSSES UNDER 1.055)
    c3 = (close CROSSES UNDER 1.060)
    c4 = (close CROSSES UNDER 1.065)
    c5 = (close CROSSES UNDER 1.070)
    c6 = (close CROSSES UNDER 1.075)
    c7 = (close CROSSES UNDER 1.080)
    c8 = (close CROSSES UNDER 1.085)
    c9 = (close CROSSES UNDER 1.090)
    c10 = (close CROSSES UNDER 1.095)
    c11 = (close CROSSES UNDER 1.100)
    c12 = (close CROSSES UNDER 1.105)
    c13 = (close CROSSES UNDER 1.110)
    c14 = (close CROSSES UNDER 1.115)
    c15 = (close CROSSES UNDER 1.120)
    c16 = (close CROSSES UNDER 1.125)
    c17 = (close CROSSES UNDER 1.130)
    
    IF NOT ONMARKET AND (c1 OR c2 OR c3 OR c4 OR c5 OR c6 OR c7 OR c8 OR c9 OR c10 OR c11 OR c12 OR c13 OR c14 OR c15 OR c16 OR c17) AND c50 AND c51 AND c52 AND c53 THEN
    
    SELLSHORT 1 CONTRACT AT MARKET
    ENDIF
    
    // Stop e target
    SET STOP pLOSS 40
    SET TARGET pPROFIT 70
    #192328 quote
    robertogozzi
    Moderator
    Master

    Tieni presente che per fare una candela del TF a 2 ore occorrono 7200 unità da 1 secondo ciascuna, per cui se l’indicatore usa una media semplice a 20 periodi ne occorrono 20 volte tanto, cioè 144000. S la media è esponenziale va ben oltre le 200000 (200K) unità supportate.

    Ad ogni modo prova con 200K unità sul grafico quando fai il backtest e dagli da inizio a fine.

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

PROBLEMA SU TF 1 SECONDO


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
GIULIO.BI @giulio-bi Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
3 years, 9 months ago.

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