PDA

View Full Version : stratety doesn't work.


zhaofang8898
04-18-2009, 10:58 AM
if the high[0] is the highest of the loast 30 period, generate a down arrow.

NinjaTrader_Bertrand
04-18-2009, 12:20 PM
Are you working this out in the Strategy Wizard? If so please post a screenshot of your setup conditions, you might want to do something like this

if (CrossBelow(High, MAX(High, 30), 1))
{
DrawArrowDown("Sell" + CurrentBar, false, 0, High[0] + 1 * TickSize, Color.Red);
}

roonius
04-18-2009, 12:24 PM
if the high[0] is the highest of the loast 30 period, generate a down arrow.

if(High[0] == MAX(High, 30)[0])
// Do your stuff

or

if(HighestBar(High, 30) == 0)
//Do your stuff

zhaofang8898
04-20-2009, 08:47 AM
if(High[0] == HighestBar(High, 30))

NinjaTrader_Josh
04-20-2009, 08:56 AM
zhaofang8898,

Please do not mix and match the concepts. Roonius provided you with two separate ideas that will do what you have specified. You can either go with option A or option B.

zhaofang8898
04-20-2009, 11:50 AM
thanks a lot for your help, guys