PureBytes Links
Trading Reference Links
|
Can someone please help me debug the following function?
It should plot as a straight line each day, scaled to represent
the distance between the high and low of the previous day.
The hard part is that I don't want to subtract the highest
high minus the lowest low in the last day's worth of bars,
but in one day's worth of bars starting with the last bar
yesterday. My approach was to do something like:
IDRange =
Highest(High, MRO(Date <> Date[1], BarsPDay, 1))
[1+ MRO(Date <> Date[1], BarsPDay, 1)]
- Lowest(Low, MRO(Date<> Date[1], BarsPDay, 1))
[1 + MRO(Date <> Date[1], BarsPDay, 1)]
where BarsPDay is the number of intraday bars each day.
For T-Bonds with 5-minute bars, I make that out to be 79.
Unfortunately, it doesn't plot as a straight line each day.
Instead, it ramps unevenly up or down to the right level.
I assume that I've bungled the MROs, but can't see how.
Any thoughts?
Thanks to all.
Owen Davies
|