uso candele HA

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #100293 quote
    Gabriele Battista
    Participant
    Senior

    vorrei utilizzare l’open ed il close delle candele HA in un indicatore come posso fare? grazie

    #100296 quote
    robertogozzi
    Moderator
    Master

    Questa è la definizione delle candele HA, che solitamente si mette all’inizio del codice e comunque prima che tu le utilizzi:

    if barindex > 0 then 
       xClose  = (open+close+low+high)/4
       xOpen   = (xOpen[1]+xClose[1])/2
       //haHigh  = Max(xOpen, xClose)
       //haLow   = Min(xOpen, xClose)
       //xHigh   = Max(High,haHigh)
       //xLow    = Min(Low,haLow)
       //xRange  = abs(xClose - xOpen)
    else
       xClose  = (open+close+low+high)/4
       xOpen   = Open
       //haHigh  = Max(xOpen, xClose)
       //haLow   = Min(xOpen, xClose)
       //xHigh   = Max(High,haHigh)
       //xLow    = Min(Low,haLow)
       //xRange  = abs(xClose - xOpen)
    endif

    Ho commentato tutte le righe che non ti servono, in quanto tu farai riferimento solo ad xClose ed xOpen, che userai al posto di CLOSE ed OPEN quando ti servirà.

    Una media calcolata su HA sarà:

    Media = average[20,0](xClose)  //invece di usare CLOSE
    #100409 quote
    Gabriele Battista
    Participant
    Senior

    grazie, gentilissimo

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

uso candele HA


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Gabriele Battista
6 years, 9 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 06/10/2019
Status: Active
Attachments: No files
Logo Logo
Loading...