[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] How to calculate "Bars Back"?



PureBytes Links

Trading Reference Links

All,

I would like to calculate the moral equivelent of Easy Language's
"Bars Back" so that I can filter out (in Explorations) all bars prior
to say ... "30 days back" ... or filter out all bars within a range.
I've experimented with BarIndex() and BarCount but can't make hide nor
hare of these values other than a logical expression that determines
the latest bar...

IIf(BarIndex() == (BarCount - 1), 1, 0)

However this doesn't do much good when calculating ranges or filtering
out ranges of bars.

Any sage guidence on bars back ranges that are easy to use?

-- John