Calcolare numero di barre tra due candele

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #194758 quote
    abmilanesiabmilanesi
    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
    robertogozzirobertogozzi
    Moderator
    Legend

    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.
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

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 robertogozzirobertogozzi
4 years, 3 months ago.

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