if (Position.MarketPosition == MarketPosition.Long)
{ YaxisPlacement = Position.AveragePrice + 10*TickSize;
Brush TargetBrush = new SolidColorBrush(Colors.Green);
TargetBrush.Freeze();}
if (Position.MarketPosition == MarketPosition.Short)
{ YaxisPlacement = Position.AveragePrice - 10*TickSize;
Brush TargetBrush = new SolidColorBrush(Colors.Red);
TargetBrush.Freeze();}
Draw.HorizontalLine(this, "TargetLine1", true, YaxisPlacement, Brush.TargetBrush, DashStyleHelper.Solid, 2);
What am I missing here?
Comment