protected override void Initialize()
{
CalculateOnBarClose = true;
Add(PeriodType.Minute, 5);
SetStopLoss(450);
MP = new DataSeries(this);
TT = new DataSeries(this);
PosLow = new DataSeries(this);
}
and I have a trailing stop (highlighted in orange) but the Trailing Stop does not work? Cant figure out why?
// ///////////////////////
// Trailing Stop Long
// ///////////////////////
if (Position.MarketPosition == MarketPosition.Long)
{
MyATRCalc = ATR(14)[0]*atr5min_trail_mult_long;
if ((TT[0] != TT[1]) || (MP[1] != 1))
{
PosLow[0] = Low[0] - MyATRCalc;
}
PosLow[0] = Math.Max(PosLow[1], (Low[0]-MyATRCalc));
DrawDot("TStop_Long"+ CurrentBar, true, 0, PosLow[0], Color.Orange);
}
ExitLongStop(PosLow[0]);

Comment