Account.MarginLevel , why is it nullable?
Created at 13 Dec 2020, 23:45
Account.MarginLevel , why is it nullable?
13 Dec 2020, 23:45
I want my bot not to take any position if Margin Level is below a certain limit, say 150%.
But when I look at Account.MarginLevel I notice that it is nullable double, so why is it nullable? I have also checked it in backtesting and it is null.
How can I practically calculate my Margin Level if this is not available?
PanagiotisCharalampous
14 Dec 2020, 08:50
Hi JeanPaul,
The Margin Used is 0 (probably no positions are open), consequently the margin level will be N/A. There is no margin level if there are no positions open.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous