public Trade(IKH Robot) { Robot.Positions.Closed += OnClosePosition; PositionList = new List <Position>(); TP1Striked = false; TP2Striked = false; }
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); }