Massimo e Minimo fascia oraria

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

    Ciao,

    devo individuare massimo minimo precedente ad una certa ora. Cosi è corretto ?

    Ad esempio time frame ad 1  minuto alle 09000 ottengo massimo e minimo tra le 0830 e le 090000

    Grazie

    Emanuele

     

    Once Entertime = 090000
    If Time = Entertime Then
    Maximo = High[30]
    Minimo  = Low[30]
    endif
    #196816 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Si, va benissimo.

    Ad ogni modo puoi verificarlo facilmente sul grafico dei prezzi aggiungendo, alla fine del tuo codice, le seguenti due righe:

    GraphOnPrice Maximo coloured(0,0,255,255)   //blù
    GraphOnPrice Minimo coloured(255,0,0,255)   //rosso
    #196846 quote
    volpiemanuelevolpiemanuele
    Participant
    Veteran
    Once Entertime = 090000
    If Time = Entertime Then
    Maximo = Highest[30](high)
    Minimo  = Lowest[30](low)
    endif

    Controllando nel grafico come l’ho riscritto segna effettivamente massimo e minimo delle 30 candele precedenti. Nell’altro modo no; segnava massimo e minimo della 30 candela prima dell’ora in Entertime. Ti torna ?

    #196865 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    No, com’era prima, non avdendo indicato di cosa doveva essere verificato il massimo, per difetto veniva assunto CLOSE.

    #196878 quote
    volpiemanuelevolpiemanuele
    Participant
    Veteran

    Scusa ma non ho capito

    #196885 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Scusa, ho frainteso io. Nel primo codice prende il massimo/minimo della 30esima candela precedente, mentre il secondo codice prende il massimo/minimo delle ultime 30 barre.

    #196887 quote
    volpiemanuelevolpiemanuele
    Participant
    Veteran

    ok chiaro….

    Poi se mi aiuti (ho provato a cercare ma non ho trovato quello che mi serve). Vorrei individuare massimo e minimo chiusura del giorno prima. Essendo CFD ho letto che conviene prendere quella che chiude all’una di notte…in ogni caso con possibilità di indicare l’orario. Grazie

    #196951 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Eccolo:

    ONCE Inizio = 000000     //000000  inizio giornata
    ONCE Fine   = 240000     //240000  fine  giornata
    ONCE HH     = 0
    ONCE LL     = 0
    ONCE HHprec = 0
    ONCE LLprec = 0
    IF OpenTime = Inizio THEN
       HHprec = HH
       LLprec = LL
       HH     = high
       LL     = low
    ENDIF
    IF (OpenTime > Inizio) AND ((OpenTime <= Fine) AND (OpenTime > OpenTime[1])) THEN
       HH = max(HH,high)
       LL = min(LL,low)
    ENDIF
    RETURN HHprec AS "Massimo di Ieri",LLprec AS "Minimo di Ieri"
    #200039 quote
    volpiemanuelevolpiemanuele
    Participant
    Veteran

    Grazie

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

Massimo e Minimo fascia oraria


ProOrder: Trading Automatico & Backtesting

New Reply
Author
Summary

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

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