Then outside of the condition I try to set the ExitLongStop as the Max of LongStop at the time of the fill (which doesn't change) and a moving average (which continues to change each OnBarUpdate).
It does not seem to be picking up the LongStop variable I have created.
Do I need to place this somewhere else in the code
protectedoverridevoid OnBarUpdate()
{
// Condition set 1
If ........
{
LongStop = Low[1];
EnterLong(DefaultQuantity,"");
}
Stop = Math.Max(SMA(Low, 8)[1],LongStop );
ExitLongStop(Stop);
}
Comment