Heikin Ashi + Parabolic SAR Gael

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #156101 quote
    Gael
    Participant
    Average

    Salve a tutti,

    vi scrivo per chiedervi se sareste in grado di creare un trading System che ho in mente, ma per mia sfortuna non ho le capacità per metterlo in pratica visto che non conosco il linguaggio di programmazione.

    Ho messo in allegato il progetto.

    Grazie mille per la vostra attenzione.

    Il-trading-system-deve-essere-composto-dal-indicatore-Parabolic-Sar-e-dalle-candele-Heikin-ashi.pdf
    #156207 quote
    robertogozzi
    Moderator
    Master

    Eccolo:

    DEFPARAM CumulateOrders = FALSE
    once xOpen = open
    xClose     = (open + close + high + low) / 4
    if barindex > 0 then
    xOpen  = (xOpen + xClose[1]) / 2
    endif
    xLow       = min(low,min(xClose,xOpen))
    xHigh      = max(high,max(xClose,xOpen))
    xUpperWick = xHigh - max(xOpen,xClose)
    xLowerWick = min(xClose,xOpen) - xLow
    UpperShaved= (xUpperWick = 0)
    LowerShaved= (xLowerWick = 0)
    MySAR      = SAR[0.02,0.02,0.2]
    CrossOver  = xClose CROSSES OVER  MySAR
    CrossUnder = xClose CROSSES UNDER MySAR
    // condizioni LONG
    Lcond      = LowerShaved AND CrossOver  AND Not OnMarket
    // condizioni SHORT
    Scond      = UpperShaved AND CrossUnder AND Not OnMarket
    //
    IF LongOnMarket THEN
       MyDiff = abs(min(xOpen,xClose) - MySAR) / 2    //trailing stop LONG
       MyStop = max(MySAR + MyDiff,MyStop)
       SELL AT MyStop STOP
    ELSIF ShortOnMarket THEN
       MyDiff = abs(max(xOpen,xClose) - MySAR) / 2    //trailing stop SHORT
       MyStop = min(MySAR - MyDiff,MyStop)
       EXITSHORT AT MyStop STOP
    ENDIF
    // entrata LONG
    IF Lcond THEN
       BUY 1 Contract at Market
       MyDiff = abs(min(xOpen,xClose) - MySAR) / 2
       SET TARGET PROFIT MyDiff * 7
       MyStop = MySAR + MyDiff
       SELL AT MyStop STOP
    ENDIF
    // entrata SHORT
    IF Scond THEN
       SELLSHORT 1 Contract at Market
       MyDiff = abs(max(xOpen,xClose) - MySAR) / 2
       SET TARGET PROFIT MyDiff * 7
       MyStop = MySAR - MyDiff
       EXITSHORT AT MyStop STOP
    ENDIF
    #156327 quote
    Gael
    Participant
    Average

    Grazie mille Roberto, molto gentile

    #156665 quote
    Gael
    Participant
    Average

    Scusa il disturbo, ma dove posso guardare il Time frame nel codice?

    #156672 quote
    robertogozzi
    Moderator
    Master

    Non c’è un TF specifico, utilizza quello che è sul grafico.

    #157241 quote
    Gael
    Participant
    Average

    Ah ok, grazie mille per l’informazione.

    #162793 quote
    Gael
    Participant
    Average

    Scusa il disturbo Roberto, ti posso chiedere di inviarmi il codice qua sopra in formato .itf per favore.

    grazie in anticipo

    #162816 quote
    MauroPro
    Participant
    Veteran

    Te lo allegherà sicuramente Roberto.

    In ogni caso puoi provare a  fare da solo in questo modo: nell’immagine con la formula sopra riportata, in alto a destra vedi due piccole icone. Se premi in quella più a sinistra ti si seleziona il testo della strategia. Copi il testo, vai in: indicatori –> backtesting –> nuovo –> la incolli e gli dai il nome che vuoi. Poi basta che selezioni la strategia rinominata e vai in “esporta” per avere il file .itf

    robertogozzi thanked this post
    #162821 quote
    robertogozzi
    Moderator
    Master

    Nel caso tu non sia riuscito a fare come suggerito da MauroPro, lo allego qui.

    MySystem.itf
    #162878 quote
    Gael
    Participant
    Average

    Grazie mille ad entrambi, troppo gentili

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

Heikin Ashi + Parabolic SAR Gael


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
Gael @gael Participant
Summary

This topic contains 9 replies,
has 3 voices, and was last updated by Gael
4 years, 11 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 01/03/2021
Status: Active
Attachments: 2 files
Logo Logo
Loading...