Max e min ultime N candele e range ultima candela

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #69760 quote
    volpiemanuelevolpiemanuele
    Participant
    Veteran

    Vorrei sviluppare un sistema che entra a mercato se il close è maggiore (long) o minore (short) delle ultime 26 candele e se l’ultima candela rientra in un certo range. Puo’ andare questo codice ?

    DEFPARAM CumulateOrders = FALSE
    ordersize=1
    ONCE MaxBarre = 26            //Numero di candele nel range
    ONCE MaxPips  = 20            //Numero di pips di differenza
    hh = highest[MaxBarre](high)  //prezzo più alto  delle barre desiderate
    ll = lowest[MaxBarre](low)    //prezzo più basso delle barre desiderate
    Laterale = (high – low) <= (MaxPips * pipsize) // se siamo in un range ultima candela
    If  close > hh and laterale Then

    Buy ordersize shares at market nextbaropen

    endif

    if  close < ll and laterale then

    Sellshort ordersize shares at market nextbaropen

    endif

    #69761 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Si, va bene. Devi solo aggiungere lo Stop Loss ed il Target Profit.

    NEXTBAROPEN puoi anche non metterla, le strategie vengono sempre essguite alla chiusura di ogni barra, prima dell’apertura della successiva. È un’istruzione obsoleta tenuta per compatibilità con vecchie strategie.

    (high – low) puoi sostituirlo con RANGE, è la stessa cosa.

    #69769 quote
    volpiemanuelevolpiemanuele
    Participant
    Veteran

    Grazie…devo aggiungere altre cose….se ho difficoltà posto qui il resto.

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

Max e min ultime N candele e range ultima candela


ProOrder: Trading Automatico & Backtesting

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by volpiemanuelevolpiemanuele
8 years, 4 months ago.

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