Calcolare numero di barre tra due candele

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #194758 quote
    abmilanesi
    Participant
    New

    Buongiorno! Sto programmando un indicatore, e mi servirebbe sapere il numero di barre che intercorrono tra due candele.

    Il calcolo deve avvenire tra la candela corrente e una barra che sto identificando come massimo di periodo (vedi screenshot).

    swingmax = highest[10](high)

    Come posso calcolarlo?

     

    Vi ringrazio in anticipo

    Cattura-1.png Cattura-1.png
    #194827 quote
    robertogozzi
    Moderator
    Master

    Puoi usare HighestBars[40](high) per ottenere l’indice della barra che ha quel valore indicato tra parentesi tonde (può essere anche una media, o Rsi, ecc…). Restituisce 0=barra corrente, 1=prima barra precedente, ecc…

    Nel tuo caso:

    Barra = HighestBars[40](high) //barra dove si è verificato il massimo nelle ultime 40 barre

    Puoi utilizzare la variabile BARRA per sapere quante barre sono passate, 0 significa che la barra attuale contiene il massimo, 5 significa che il massimo si è verificato 5 barri prima, ecc…

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

Calcolare numero di barre tra due candele


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
abmilanesi @abmilanesi Participant
Summary

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

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