PDA

View Full Version : identifying the avg high/low for a given period


RickStevenson1
03-02-2010, 08:42 AM
Anyone have an idea of how to grab the avg high and low of a given period?
I saw the example Ninja gives of trading a breakout and it's not quite what I need.
I'd like to have my strategy identify a channel situation.
Rick

NinjaTrader_Tim
03-02-2010, 09:27 AM
Hi RickStevenson1,


You can call on the SMA to calculate the average, for example...
double average = SMA(High, 10)[0];

Print("The average high of the last 10 bars is " + average);