MAX e MIN delle Candele precedenti per n Period

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #203805 quote
    byT77byT77
    Participant
    New

    Buongiorno a tutti,

    Necessito del vostro aiuto per codificare una strategia.

    Vorrei identificare la chiusura massima e minima delle quattro candele precedenti, escludendo la candela [0].

    Ho provato con

    y1 = highest[4](close)

    y2 = lowest[4](close)

    Ma ovviamente mi considera anche la Candle[0]. (So benissimo che questo sia un errore)

    Vi ringrazio in anticipo

    Candle-4.jpg Candle-4.jpg
    #203807 quote
    byT77byT77
    Participant
    New

    Ho corretto il codice in

    x1 = Max(Close[4],max(Close[3],Max(Close[2],close[1])))
    x2 = Min(Close[4],min(close[3],min(close[2],close[1])))

    Risolvendo così il mio errore.

    Condivido lo stesso e grazie comunque.

    Accetto volentieri altri consigli utili.

    #203815 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Le soluzioni migliori sono:

    y1 = highest[4](close[1])
    y2 = lowest[4](close[1])

    oppure:

    y1 = highest[4](close)[1]
    y2 = lowest[4](close)[1]

    oppure ancora:

    y1 = highest[4](close)
    y2 = lowest[4](close)
    // poi fai riferimento a y1[1] e y2[1]
    #203865 quote
    byT77byT77
    Participant
    New

    Grazie mille per la condivisione.

Viewing 4 posts - 1 through 4 (of 4 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 delle Candele precedenti per n Period


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
byT77 @byt77 Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by byT77byT77
3 years, 10 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 11/08/2022
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...