ATR + LINE

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #193840 quote
    Marcot18Marcot18
    Participant
    Veteran

    Buonasera,

    vorrei aiuto per programmare due indicatore

    un indicatore mi dovrebbe segnare il massimo e il minimo con due linee sul grafico nella fascia oraria tra le 000000 e le 08:00 del mattino, ogni giorno, cancellando le linee dei giorni create il giorno prima.

     

    l’altro indicatore è un ATR settato a 5 periodi, deve restituirmi il 4% del valore del giorno precedente, ad esempio: oggi 25/05/2022 l’indicatore mi darà valore 4 punti se atr del 24/05/2022 era pari a 100 punti di valore.

     

    grazie per la vostra collaborazione

    #193846 quote
    Marcot18Marcot18
    Participant
    Veteran

    l’indicatore ATR c’è lho fatta a farlo da solo, mi servirebbero solo le linee se puoi aiutarmi roberto

     

    grazie

    #193856 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Eccole, anche se si estendono per tutto il grafico, si riferiscono solo al periodo 000000 – 080000 (che puoi cambiare come vuoi):

    DEFPARAM DrawOnLastBarOnly = True
    ONCE Inizio = 000000
    ONCE Fine   = 080000
    ONCE hh     = 0
    ONCE ll     = 9999999
    IF (OpenTime = 000000) OR ((OpenTime > 000000) AND (OpenTime < OpenTime[1])) THEN
       hh = high
       ll = low
    ENDIF
    IF OpenTime <= Fine THEN
       hh = max(hh,high)      //Massimo
       ll = min(ll,low)       //Minimo 
    ENDIF
    DrawHLine(hh) coloured(0,128,0,155)  //Verde  (per i colori RGB vedi http://cloford.com/resources/colours/500col.htm)
    DrawHLine(ll) coloured(255,0,0,255)  //Rossa
    RETURN
    #194007 quote
    Marcot18Marcot18
    Participant
    Veteran

    grazie Roberto

    perfetto!!

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

ATR + LINE


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
Marcot18 @marcot18 Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by Marcot18Marcot18
4 years, 6 months ago.

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