Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 1/12/2005 Posts: 88
|
I am trying to display a running calculation of price relative to the open etc..
How would I do that.
Does my code get called on every update or every bar?
Thanks in advance.
Jeff
|
|
Registered User Joined: 1/12/2005 Posts: 88
|
Oh these are intraday statistics.
--
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
If I'm understanding your question correctly, which is not guaranteed, you may wish to try the following:
'Intraday Percent Change from Open
'#Cumulative
Static Open As Single
If isFirstBar
Open = Price.Open
Else If Price.DateValue.DayOfYear <> Price.DateValue(1).DayOfYear Then
Open = Price.Open
End If
Plot = 100 * Price.Last / Open - 100
Your RealCode normally gets calculated every Bar for each symbol. It is possible to adjust this using AutoLoop = false (in which case your code gets called only once per symbol).
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |