net profit and direction of the last trade
Created at 07 Jul 2018, 12:12
net profit and direction of the last trade
07 Jul 2018, 12:12
Hello, please
can smbd help and provide us with the code, which will retriev he net profit and the direction of the last closed trade? Thank you
Replies
skalkas
09 Jul 2018, 15:44
Hello Andrey,
thank you...this one works as a pront log, but what Iam trying is to fill with those two values some variables....something like this, but it creates an error...and I dont now whats wrong:
var lastTrade = History.LastOrDefault(); if (lastTrade != null) { Print("Last trade {0} {1}, profit: {2}", lastTrade.TradeType, lastTrade.SymbolCode, lastTrade.NetProfit); } var netpprofit = lastTrade.NetProfit; var tradetype = lastTrade.TradeType;
@skalkas
ap11
09 Jul 2018, 15:23
Hi Skalkas,
Please see the code below:
Regards,
Andrey
@ap11