if (initially) active.low=0, temp.low will never be less than active.low... solution is:
if(temp.low>0) {
if(temp.low<active.low || active.low<=0) { active.low=temp.low;
a.low.shift=Lowest(Symbol(),5,MODE_LOW,288,0); } }Hi,
What mean value 288 in your code?
It's period's value or something else.
Igor
288 is a 24 hour period in 5 minute increments, used in the following...
int Lowest( string symbol, int timeframe, int type, int count=WHOLE_ARRAY, int start=0)
Returns the shift of the least value over a specific number of periods depending on type.
Parameters:
symbol - Symbol the data of which should be used to calculate indicator. NULL means the current symbol.
timeframe - Time frame. It can be any of Time frame enumeration values.
type - Series array identifier. It can be any of Series array identifier enumeration values.
count - Number of periods (in direction from the start bar to the back one) on which the calculation is carried out.
start - Shift showing the bar, relative to the current bar, that the data should be taken from.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
i've been unable to get a return value(greater than zero) for the following code, does anyone else have this problem? ...or is it a problem with my coding?
if(temp.low>0) {
if(temp.low<active.low) { active.low=temp.low;
a.low.shift=Lowest(Symbol(),5,MODE_LOW,288,0); } }[/CODE]
I have obtained a return value (greater than zero) from the following code, which is oppositely identical to the above code...
rendering me perplexed...
[CODE] temp.high=High;
if(temp.high>active.high) { active.high=temp.high;
a.high.shift=Highest(Symbol(),5,MODE_HIGH,288,0); }helpful comments appreciated...