Strategia con l’indicatore BykovTrend NRTR

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #169457 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    (dal topic https://www.prorealcode.com/topic/mql5-to-prt/#post-169436)

    Certo che si può creare una strategia, questa l’ho creata con la creazione assistita ed entra, Long o Short, quando c’è un cambio di direzione dell’indicatore (fa lo Stop & Reverse se è ancora a mercato):

    // Definizione dei parametri del codice
    DEFPARAM CumulateOrders = False // Posizioni cumulate disattivate
    // Cancellare tutti gli ordini in attesa e chiudere tutte le posizioni all'orario "Flat After"
    DEFPARAM FLATAFTER = 180000
    
    // Impedisce al sistema di creare nuovi ordini per entrare a mercato o aumentare la taglia della posizione prima dell'orario specificato
    noEntryBeforeTime = 090000
    timeEnterBefore = time >= noEntryBeforeTime
    
    // Impedisce al sistema di piazzare nuovi ordini per entrare a mercato o aumentare la taglia della posizione dopo l'orario indicato
    noEntryAfterTime = 160000
    timeEnterAfter = time < noEntryAfterTime
    
    // Impedisce al sistema di tradare in giorni specifici della settimana
    daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
    
    // Condizioni per entrare su posizioni long
    ignored, ignored, indicator1 = CALL "PRC_BykovTrend_NRTR"[3, 9, 0.375]
    c1 = (indicator1 CROSSES OVER 0)
    
    IF c1 AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF
    
    // Condizioni per uscire da posizioni long
    ignored, ignored, indicator2 = CALL "PRC_BykovTrend_NRTR"[3, 9, 0.375]
    c2 = (indicator2 CROSSES UNDER 0)
    
    IF c2 AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry THEN
    SELLSHORT AT MARKET
    ENDIF
    
    // Stop e target
    SET STOP pLOSS 50
    SET TARGET pPROFIT 150

    l’ho provata sul DAX, 30 minuti, e funziona.

    #169471 quote
    tundercuttundercut
    Participant
    Senior

    Un doveroso GRAZIE a te ,Roberto, che sei sempre genile e disponibile.

    #169688 quote
    luxrunluxrun
    Participant
    Master

    La strategia intraday, postata da Roberto, non l’ho provata perché preferisco timeframe giornalieri. Ho cambiato i parametri e alcune righe di codice e mi sembra che ci sia un buon ritorno con molti titoli maggiori del mercato usa. E’ un prova e molto andrà ancora sviluppato. Questo è il mio “piccolo” contributo a continuare ad evolvere questo strumento. Grazie a tundercut e a Roberto

     

    // Bykof trend trading system daily
    
    // Definizione dei parametri del codice
    DEFPARAM CumulateOrders = False // Posizioni cumulate
    
    // Condizioni per entrare su posizioni long
    ignored, ignored, indicator1 = CALL "PRC_BykovTrend_NRTR"[3, 10, 1.0]
    
    c1 = (indicator1 CROSSES OVER 0)
    IF c1 THEN
    BUY 5000 CASH AT MARKET
    ENDIF
    
    // Condizioni per uscire da posizioni long
    ignored, ignored, indicator2 = CALL "PRC_BykovTrend_NRTR"[3, 10, 1.0]
    c2 = (indicator2 CROSSES UNDER 0)
    IF c2 THEN
    SELLSHORT AT MARKET
    ENDIF
    
    // Stop e target
    SET STOP pLOSS 150
    //SET TARGET pPROFIT 300
    robertogozzi and tundercut thanked this post
    #169711 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Grazie luxrun, è una buona idea per chi opera sull’azionario e su TF più grandi 🙂

Viewing 4 posts - 1 through 4 (of 4 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

Strategia con l’indicatore BykovTrend NRTR


ProOrder: Trading Automatico & Backtesting

New Reply
Author
Summary

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

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 05/12/2021
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...