View Full Version : there has been a LH bar within last 10 bars
duck_CA
02-15-2009, 01:48 PM
i've tried
&& High[1]<High[0]
but that just gives me a LH from one bar back
NinjaTrader_Bertrand
02-15-2009, 02:03 PM
What do you define as an LH Bar exactly?
duck_CA
02-15-2009, 02:16 PM
a LH bar would be identified as soon as the current bar closed higher.
here's a pic with most current bar being a HH bar
http://screencast.com/t/Vl0bGqubc
NinjaTrader_Bertrand
02-15-2009, 02:34 PM
Are you looking to recreate the lines on this pic in NinjaScript - it would be helpful to see the code to help you convert, thanks!
duck_CA
02-15-2009, 02:47 PM
those lines are from the swing indicator...
i'm trying to find a way to look for that LH bar so i can filter around it.
example: && there has been a LH bar within the last 10 bars.
i don't have any code for this.
roonius
02-15-2009, 05:40 PM
those lines are from the swing indicator...
i'm trying to find a way to look for that LH bar so i can filter around it.
example: && there has been a LH bar within the last 10 bars.
i don't have any code for this.
You still have not explained what is LH or HH bar... You probably know it but we don't
duck_CA
02-15-2009, 05:48 PM
sorry about that
LH= lower high
HH= higher high
roonius
02-15-2009, 06:06 PM
You can try something like this:
private bool DoWeHaveLowerHigh(int barsago)
{
for(int i = 0; i<=barsago; i++)
{
if (High[i-1] > High[i]) return true;
}
return false;
}