Need Reason, StopLoss, TakeProfit in HistoricalTrade class

cTrader Automate
Votes since: 31 Dec 2020;

  10 Jan 2021, 06:15
Need Reason, StopLoss, TakeProfit in HistoricalTrade class

protected override void OnTick()
            var posList = Positions.Where(p => p.SymbolName == Symbol.Name && p.Label == myLabel)
            var penList = PendingOrders.Where(p.SymbolName == Symbol.Name && p.Label == myLabel);

            var cntPosition = posList.Count();

            var cntPending = penList.Count();

         if (cntPosition == 0 && cntPending == 0)

               if(!IsTradeNow() ) return; // IsTradeNow is method that return boolean regarding to Server.Time between my time setting and Meet my some indicator value satisfied

                HistoricalTrade hist = History.FindLast(myLabel,Symbol.Name);
                if (hist != null)
                    //need closing Reason,SL,TP here



Unfortunately this information is not available in the HistoricalTrade class.

Now these are found in only PositionClosedEvent, but it's not satisfied my strategy if position closed at tp or sl during TradeNow false or terminal closed;

In mql4 and mql5 it's very easy.

As ClosingPrice, Pips, etc are found, Hopefully Spotware Systems will add these properties Reason, StopLoss, TakeProfit in HistoricalTrade class as early as possible.

Also please check link