It does not seem to be working. It is a little hard to test because "test on historical data" only seems to count trades.
Here is a snip of the code.
-------
CalculateOnBarClose = false;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Condition set 1
if (CrossAbove(Ergodic(3, 5, 14).Main, MyInput0, 6)
&& CrossAbove(DM(14).DiPlus, DM(14).DiMinus, 6)
&& CrossAbove(WoodiesCCI(2, 5, 14, 34, 25, 6, 60, 100, 2), MyInput0, 6))
{
Alert("MyAlert0", Priority.High, "Triple cross Bull has occured", "", 0, Color.Lime, Color.Black);
SendMail("[email protected]", "[email protected], [email protected]", "ES bull triple cross", "Bullish ES triple cross has occured");
PlaySound(@"C:\Program Files (x86)\NinjaTrader 7\sounds\newuptrend.wav");
}
// Condition set 2
if (CrossBelow(Ergodic(3, 5, 14).Main, MyInput0, 6)
&& CrossBelow(DM(14).DiMinus, DM(14).DiPlus, 6)
&& CrossBelow(WoodiesCCI(2, 5, 14, 34, 25, 6, 60, 100, 2), MyInput0, 6))
{
SendMail("[email protected]", "[email protected], [email protected]", "ES Bear triple cross", "Bearish ES triple cross has occured");
Alert("MyAlert26", Priority.High, "Bearish ES triple cross", "", 0, Color.Firebrick, Color.Black);
PlaySound(@"C:\Program Files (x86)\NinjaTrader 7\sounds\newdowntrend.wav");
}
}
If anyone can see why it is not working please let me know. Yes it is enabled.
Also, If knew how to distinguish between a 90 degree cross over and a 4 degree one I might use this strategy for execution. But I don't. So I am setting it to alert me so I can look at the chart.
Anyway, any help is appreciated. Thank you

Comment