Duxx
 Elite
       Posts: 881
Joined: 2/18/2009
User Profile |
Hello Jim,
I think I have it that way:
#Indicator
#param "CurrATRpds", 15
#param "HistATRpds", 660
Dim RatioHistVol as Single
If Symboldata.Numrec - 1 < HistATRpds then
RatioHistVol = ATR(CurrATRpds) / ATR(Symboldata.Numrec - 1)
Else
RatioHistVol = ATR(CurrATRpds) / ATR(HistATRpds)
End If
Plot( "HistVol", RatioHistVol )
PlotLabel(2)
Return RatioHistVol
|