atr non notturno

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #98478 quote
    Gabriele BattistaGabriele Battista
    Participant
    Senior

    Mi chiedevo se fosse possibile calcolare un indicatore ad esempio l’ATR su TF m10 escludendo una fascia oraria dal calcolo, ad esempio sul dax solo dalle 9:00 alle 22:00 escludendo la trattazione notturna. Grazie.

    #98491 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Si, eccolo:

    p    = 10                       //10 periodi
    IF time >= 090000 AND time <= 220000 THEN
       MyTR = max(Range,max(abs(high - close[1]),abs(low - close[1])))
       IF BarIndex < p THEN
          MyATR = MyTR
       ELSE
          MyATR = ((MyATR[1] * (p - 1)) + MyTR) / p
       ENDIF
    ENDIF
    RETURN MyATR

    come puoi vedere dalla foto allegata (Dax, 10 minuti), dopo le prime P (p=periodi) barre del nuovo giorno la differenza tra questo e l’ATR della piattaforma c’è qualche lieve differenza. Nelle prime P barre, invece, ce n’è molta, che diminuisce barra dopo barra.

    x-6.jpg x-6.jpg
    #98520 quote
    Gabriele BattistaGabriele Battista
    Participant
    Senior

    Grazie, perfetto!

Viewing 3 posts - 1 through 3 (of 3 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 non notturno


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Gabriele BattistaGabriele Battista
7 years, 4 months ago.

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