Thank you for your response.
You need to set EntriesPerDirection to 3 and EntryHandling to AllEntries: http://www.ninjatrader.com/support/h...ryhandling.htm
Then give unique entrySignalNames and use them for fromEntrySignalName in the SetProfitTarget and SetTrailStop methods:
protected override void Initialize() { EntriesPerDirection = 3; EntryHandling = EntryHandling.AllEntries; SetProfitTarget("ole1", CalculationMode.Ticks, 8); SetProfitTarget("ole2", CalculationMode.Ticks, 16); SetProfitTarget("ole3", CalculationMode.Ticks, 20); SetTrailStop("ole3", CalculationMode.Ticks, 20, false); CalculateOnBarClose = true; } protected override void OnBarUpdate() { // Condition set 1 if (Close[0] > Close[1]) { EnterLong(MyInput0, "ole1"); EnterLong(MyInput0, "ole2"); EnterLong(MyInput0, "ole3"); }
Leave a comment: