Example #1
0
 public Trade(IKH Robot)
 {
     Robot.Positions.Closed += OnClosePosition;
     PositionList            = new List <Position>();
     TP1Striked              = false;
     TP2Striked              = false;
 }
Example #2
0
        public bool OpenMarket(IKH Robot)
        {
            TradeResult Result = Robot.ExecuteMarketOrder(Type, Robot.Symbol.Name, Volume, Signal, SL, null, Globals.Strategy, (Setup.TrailingStopOnOpen || Setup.TrailingStopOnOpenToBreakEven));

            //if () {
            //    Result.Position.ModifyTrailingStop(true);
            //}
            if (Result.IsSuccessful)
            {
                PositionList.Add(Result.Position);
                return(true);
            }
            return(false);
        }