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

Re: Lowest Low Question



PureBytes Links

Trading Reference Links

Simon,

What you need is the following.
1. At the first bar of the day you need to 'reset' your lowest low value,
assuming you do not want to reset it sometime sooner, like some time between
12:15 and the market closing.
VARS:  mylow(9999.99);
........
If TIME = SESS1FIRSTBARTIME then mylow = 9999.99;
........
2. Then in your code somewhere else you need to put this code
........
If TIME > 1015 AND TIME < 1215 then
IF LOW < mylow then mylow = LOW;
.......

Hope this helps.

John


Simon Campbell wrote:

> I'm writing some code on a 5 min S&P chart and have a question ...
>
> At 10:15am I've captured the value of the highest high that occurred
> between 9:45am and 10:15am (e.g. 'SimHigh' = 967.50):
>
> For every 5 min bar between 10:15am and 12:15am, I want to check for the
> following:
> *  The lowest low since 10:15 only (ingoring any lows pre-10:15)
> *  Is this lowest low <=Simhigh-300 points?
>
> To avoid writing out 24 times (!!):
> if t=10:15 ...
> if t=10:20 ...
> ..etc.
>
> is there anyway I can do this via a loop or something similar??
> My problem is that the length in the lowest(price,length) function is going
> to change with each bar between 10:15 and 12:15.
>
> Any suggestions from anyone with a better programming brain than myself
> will be greatly appreciated!
>
> Simon.