OrderCalcMargin() gives error - 4014: System function is not allowed to call

 

Hi,

I'm trying to use OrderCalcMargin inside an indicator, unfortunately that's a trade function that can't be called from an indicator. So what OrderCalcMargin really does ? Which formula does it use ? Is there any other alternative ?

Thanks

 
blouf:

Hi,

I'm trying to use OrderCalcMargin inside an indicator, unfortunately that's a trade function that can't be called from an indicator. So what OrderCalcMargin really does ? Which formula does it use ? Is there any other alternative ?

Thanks

What is a margin ? If you know it, then calculate it with your own function.
 
angevoyageur:
What is a margin ? If you know it, then calculate it with your own function.
Yeah but it calculates the margin using the price & the volume. I don't know such a formula, nor i've found a thing about :/