How to know if a position hit SL / TP (trailing SL)
Created at 14 Apr 2020, 18:57
CO
How to know if a position hit SL / TP (trailing SL)
14 Apr 2020, 18:57
I index the position in my local memory to maximize the access speed.
In onTick() function, I need to know if a position hit SL / hit TP to remove it from my index.
Can you suggest a best workaround for performance?
PanagiotisCharalampous
15 Apr 2020, 08:25
Hi contact.bitq,
You can check the reason which caused the position to close using PositionCloseReason provided in the Position.Closed event arguments.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous