When my first trade closes out at a profit, the second stop should be moving closer to the price and it is not moving where it should. In fact, it looks like it is not moving at all. I am attaching a screenshot of the chart showing that the stop did not move.
Here is the code that I have.
// Set the adjusted stop loss
if (LongLimit != null
&& LongLimit == execution.Order)
{
LongStopB = ExitLongStop(0,true,DefaultQuantity,execution.Order.AvgFillPrice-(TargetPriceLong - execution.Order.AvgFillPrice),"EntryBStop","LongEntryB");
}
The code that is posted above is located in OnExecution

Comment