Volatility Index and Risk Management

 

Hello,

 

I use a volatility index and volatility margin to protect against margin call and liquidity issues. How I create code for the Volatility index and how I programe the formula for volatility margin?

 

example -- USDZAR has a volatility index of 1 which means -170.50%, then the volatility margin = order used margin x volatility rate of -170.50%.

 

The EA will deduct the volatility margin from the account capital balance and deposited in a volatility margin account...this account will not be seen or used by the EA.

 

Any help is greatly appreciated.

 

Bob 

Reason: