position.NetProfit question
position.NetProfit question
24 Mar 2023, 00:27
Hello everyone!
I have a very simple question.
I tried to make the "PRINT" of the X.NETPROFIT a specific location is I saw that alone positive results such as: +23 +52 +68 ecc... ok...
Is it possible to get negative results? Like -12 -32 -59 ecc...
I need this because in my strategy I have conditions that are activated when the position goes also in negative.
How do I get this? can I get it to a specific position?
Thx for your time,
var NetProfit = PositionLabelID.Where(x => x.TradeType == TradeType && x.Comment == "BOOBY").Sum(x => x.NetProfit);
print(NetProfit, " PROFIT")
Replies
Goulk
24 Mar 2023, 09:51
RE:
PanagiotisChar said:
Hi there,
Is it possible to get negative results? Like -12 -32 -59 ecc...
Yes it is. If your position has negative profit then it will print negative numbers.
How do I get this? can I get it to a specific position?
All positions have a NetProfit property e.g. Positions[0].NetProfit
Need help? Join us on Telegram
Need premium support? Trade with us
Thanks, It was my coding error. :D Thx For your time.
@Goulk
PanagiotisChar
24 Mar 2023, 08:32
Hi there,
Yes it is. If your position has negative profit then it will print negative numbers.
All positions have a NetProfit property e.g. Positions[0].NetProfit
Aieden Technologies
Need help? Join us on Telegram
Need premium support? Trade with us
@PanagiotisChar