PureBytes Links
Trading Reference Links
|
Dear Group and especially ELA afficionados,
I've been tearing my hair out over what seems to me to be such a simple
ELA programing question:
I'm working with a 1-tick chart and Doug Deming's GlobalTime program
that lets me reference each tick with its time of receipt to a hundredth
of a second. (I believe that my problem is generic and does not pertain
specifically to the GlobalTime program - that program just let's me
obtain finer resolution.) What I'm seeking is: How Many Bars Have
Elapsed in the Past X Seconds?
So, for example, if I'm looking at X = 300 seconds (5 minutes), how many
bars ago was that?
I've been playing with the MRO function. For example, assuming
approximately 10 ticks/min and that the Time function is expressed in
seconds:
Value1 = MRO(Time <= Time - 300,100,1), where Value 1 should return the
BarNumber of the Bar 300 seconds ago, and therefore Bars in the Past 300
Seconds = CurrentBar - Value1.
Nevertheless, Value1 as above returns 0. I'm missing something,
somewhere.
I would appreciate any ideas that you may have. Thank you.
Sincerely,
Richard Josslin
|