Пример #1
0
 internal void DrawDirection(Robot robot, TradeType?direction)
 {
     if (direction.HasValue)
     {
         robot.Print("Direction: {0}", direction.Value.ToString());
         DirectionIcon = robot.Chart.DrawIcon("DirectionIcon", (direction.Value == TradeType.Buy ? ChartIconType.UpArrow : ChartIconType.DownArrow), robot.TimeInUtc, robot.Bid, (direction.Value == TradeType.Buy ? Color.Green : Color.Red));
     }
     else
     {
         robot.Print("Direction is not defined.");
     }
 }
 private void RedrawButton(ChartIcon.ChartIcon btn)
 {
     Invalidate(new Rectangle(btn.Position, btn.Size));
 }