View Full Version : Rule A is True then generate arrown When rule B become true
mohdfraz
01-30-2009, 07:41 AM
Hi,
I want string for strateg wizard that When Strategy wizard Tab1 Set of Rules are true on one bar than keep Tab1 true for next 10 bars.
awaiting
NinjaTrader_Josh
01-30-2009, 07:50 AM
You will need to unlock your code to do this. When Set 1 is true as an action tell it to set a variable to 0. As each new bar progresses increment the variable. When the variable is greater than you wanted then invalidate your condition at that point in time.
// Set 1
if (Close[0] > Open[0])
{
variable = true;
}
if (variable == true)
{
counter++;
}
if (counter == 10)
{
variable = false;
}
// Set 2
if (High[0] > High[1] && variable == true)
{
// Do something;
}
mohdfraz
01-30-2009, 07:55 AM
Thank you josh, is there any way i can do this in Strategy wizard? I have very less experience in script language.
Also can you suggest me where i can read how to do script strategy writing.
awaiting
NinjaTrader_Josh
01-30-2009, 08:00 AM
You would need to unlock the code to do it. Best place to start is the Help Guide tutorials. Then you can create yourself some strategies with the Wizard and unlock them to see the code.
mohdfraz
01-30-2009, 08:07 AM
Thanks Josh
Have a great week end