I am not sure why this happened once in a backtest. Enclosed is a screenshot. In almost all backtested trades, the ExitLongStop acted the way it was supposed to and got out at 2 points below the entryprice. However, there is one instance in the backtest where it exits at 11.25 points below the entryprice making my partner very uncomfortable in going live with this system. Below is some example code where I utilize this exit with the entry logic stripped (I just say if (x)). I am not sure why this happened once in the backtest and assume there is something I did incorrectly with the ExitLongStop and it is suttle as I looked over the help examples and the function signature and can't seem to find what I did wrong. Any help is appreciated. Here is my sample code:
Thank you,
David
DStop=2.00;
if(x)
{
EnterLong("By");
}
if(Position.MarketPosition == MarketPosition.Long)
{
double DStop = Position.AvgPrice-stop;
ExitLongStop(DStop,"By");
}
Comment