Entrare a mercato al primo breakout della Mediana R1 del Pivot Fibonacci.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #235008 quote
    Steven11Steven11
    Participant
    Average

    Buongiorno, vorrei costruire un sistema che prevede l’entrata, su timeframe 20 secondi, al primo breakout verso il basso del livello intermedio Fib-Mid-R1 in vendita (Sell) del Pivot orario H1 , al primo breakout verso l’alto del livello intermedio Fib-Mid-S1 in acquisto (Buy) del Pivot orario H1.

    Ho provato a formularlo io con la programmazione assistita di Prorealtime ma andando ad effettuare i backtests, noto che l’algoritmo non rispetta i livelli indicati e dà delle entrate “falsate”.

    Allego immagine del setup per chiarezza e ringrazio in anticipo chiunque potrà aiutarmi a risolvere il problema.

    Buona giornata.

    // Definizione dei parametri del codice
    DEFPARAM CumulateOrders = False // Posizioni cumulate disattivate

    // Condizioni per entrare su posizioni long
    indicator1 = (((DHigh(1) + DLow(1) + DClose(1))/3 – (.382 * (DHigh(1)-DLow(1))))+((DHigh(1) + DLow(1) + DClose(1))/3)) /2
    c1 = (close CROSSES OVER indicator1)

    IF c1 THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF

    // Condizioni per entrare su posizioni short
    indicator2 = (((DHigh(1) + DLow(1) + DClose(1))/3)+((DHigh(1) + DLow(1) + DClose(1))/3 + (.382 * (DHigh(1)-DLow(1))))) /2
    c2 = (close CROSSES UNDER indicator2)

    IF c2 THEN
    SELLSHORT 1 CONTRACT AT MARKET
    ENDIF

    DAX-20-secondi.png DAX-20-secondi.png
    #235027 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Ho fatto molte prove, cambiando molti parametri, ma la linea calcolata dall’indicatore non riesce a combaciare con quella della strategia.

    Questa versione è quella che più gli si avvicina:

    DEFPARAM CumulateOrders = False // Posizioni cumulate disattivate
    
    timeframe(1h,UpdateOnClose)
    // Condizioni per entrare su posizioni long
    indicator1 = (((DHigh(1) + DLow(1) + DClose(1))/3 - (.168 * (DHigh(1)-DLow(1))))+((DHigh(1) + DLow(1) + DClose(1))/3)) /2
    c1 = (close CROSSES OVER indicator1)
    
    // Condizioni per entrare su posizioni short
    //indicator2 = (((DHigh(1) + DLow(1) + DClose(1))/3)+((DHigh(1) + DLow(1) + DClose(1))/3 + (.382 * (DHigh(1)-DLow(1))))) /2
    c2 = (close CROSSES UNDER indicator1)
    
    timeframe(default)
    IF c1 and Not LongOnMarket THEN
       BUY 1 CONTRACT AT MARKET
    ENDIF
    IF c2 and Not ShortOnMarket THEN
       SELLSHORT 1 CONTRACT AT MARKET
    ENDIF
    
    graphonprice indicator1 coloured("Fuchsia")

    Ti consiglio di premere Ctrl+M dalla piattaforma per chiedere all’assistenza, non so proprio cosa dirti sulle cause.

    Steven11 and Iván González thanked this post
Viewing 2 posts - 1 through 2 (of 2 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

Entrare a mercato al primo breakout della Mediana R1 del Pivot Fibonacci.


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
Steven11 @steven11 Participant
Summary

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

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 07/10/2024
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...