Jim Dean
 Sage
       Posts: 3433
Joined: 3/13/2006
Location: L'ville, GA
User Profile |
Try this (not tested, from iPhone):
#Indicator
#param "CurrATRpds", 15
#param "HistATRpds", 660
Dim RatioHistVol as Single
If bar >= CurrATRpds then
If bar < HistATRpds then
RatioHistVol = ATR(CurrATRpds) / ATR(bar)
Else
RatioHistVol = ATR(CurrATRpds) / ATR(HistATRpds)
End If
Plot( "HistVol", RatioHistVol )
PlotLabel(2)
End if
Return RatioHistVol
[Edited by Jim Dean on 12/9/2011 5:35 AM]
|