Max e Min solo in alcuni TF

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #199947 quote
    EdisoneEdisone
    Participant
    Average

    Salve chiedo aiuto per un indicatore che ogni giorno mi tracci solo ed esclusivamente sul grafico DAILY delle linee orizzontali che mi traccino Max e Minimo del solo giorno precedente. Stessa cosa se mi sposto sul TF WEEKLY che mi tracci solo ed esclusivamente sul grafico WEEKLY delle linee orizzontali che mi traccino Max e Minimo della sola Settimana precedente.
    GRAZIE

    #199966 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Eccolo, funziona su tutti i time frame:

    DEFPARAM DrawOnLastBarOnly = True
    //
    // GetTimeFrame
    //
    // restituisce:
    //           1 = 1 second
    //          10 = 10 seconds
    //          60 = 1 minute
    //         300 = 5 minutes
    //        3600 = 1 hour
    //       14400 = 4 hours
    //       86400 = 1 day    (24 hours)
    //      172800 = 2 days   (48 hours)
    //      604800 = 1 week   (7  days)
    //     2592000 = 1 month  (30 days)
    //    31536000 = 1 year   (365 days)
    //          -1 = default TF (or non time based TF)
    //
    ONCE Futuro = 2      //stampa per 2 barre future
    ONCE PrevHH = 0
    ONCE PrevLL = 0
    ONCE HH     = 0
    ONCE LL     = 0
    TF = GetTimeFrame
    IF TF >= 86400 THEN
    PrevHH = HH
    PrevLL = LL
    HH     = high
    LL     = low
    Barra  = BarIndex
    ELSIF IntraDayBarIndex = 0 THEN
    PrevHH = HH
    PrevLL = LL
    HH     = high
    LL     = low
    Barra  = BarIndex
    ENDIF
    HH = max(HH,high)
    LL = min(LL,low)
    DrawSegment(Barra,PrevHH,BarIndex + Futuro,PrevHH) coloured(0,0,255,255) style(line,2)
    DrawSegment(Barra,PrevLL,BarIndex + Futuro,PrevLL) coloured(255,0,0,255) style(line,2)
    RETURN
    Edisone 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

Max e Min solo in alcuni TF


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
Edisone @edisone Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzirobertogozzi
4 years ago.

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