In the attached chart I have the same trade Historical (left) and real time (right).
I can’t find the problem within the code, if there was a problem with my code The exit should be the same in both charts.
Any advice??
Thank you
protectedoverridevoid Initialize()
{
CalculateOnBarClose = true;
EntriesPerDirection = 10;
EntryHandling = EntryHandling.AllEntries;
EMA(E_Fast).Plots[0].Pen.Color = Color.Orange;
EMA(E_Slow).Plots[0].Pen.Color = Color.Green;
Add(EMA(E_Fast));
Add(EMA(E_Slow));
Add(anaSuperTrend(m_Mult,m_ATRPeriod,m_Median));
}
////////////////////METHODS FOR LONGS
privatevoid GoLongA()
{
SetStopLoss("target1A", CalculationMode.Price, Close[0] - (StopA*TickSize), false);
SetStopLoss("target2A", CalculationMode.Price, Close[0] - (StopA*TickSize), false);
SetStopLoss("target3A", CalculationMode.Price, Close[0] - (StopA*TickSize), false);
SetProfitTarget("target1A", CalculationMode.Price, Close[0] + (Target1A*TickSize));
SetProfitTarget("target2A", CalculationMode.Price, Close[0] + ((Target1A + Target2A)*TickSize));
SetProfitTarget("target3A", CalculationMode.Price, Close[0] + ((Target1A + Target2A + Target3A)*TickSize));
entryOrderA = EnterLong("target1A");
EnterLong("target2A");
EnterLong("target3A");
}

Comment