protectedoverridevoid Initialize()
{
Add(GartleyRobotBull(5, 2, 65));
SetStopLoss("30", CalculationMode.Ticks, 0, false);
SetProfitTarget("", CalculationMode.Ticks, 20);
// CalculateOnBarClose = true;
}
///<summary>
/// Called on each bar update event (incoming tick)
///</summary>
protectedoverridevoid OnBarUpdate()
{
// Condition set 1
if ((Low[1] > GartleyRobotBull(5, 2, 65).Plot4[0])
&& (Low[0] < GartleyRobotBull(5, 2, 65).Plot4[0]))
{
EnterLong();
}
}
The strategy entry is based on an indicator (which is also plotted on the chart). The entry should occur after the price drops below Plot4 which is the blue dot between the green dot and the blue dot.
As this is my first attemp at a Ninjascript strategy I am sure there is a lot wrong. See attached jpeg for further info.

Comment