Codes

Averager on BUY and SELL simultaneously for MetaTrader 5

The Expert Advisor operates on the principle of the Moving Average. Simultaneously in both directions. Volume for BUY and SELL is calculated separately. Divide the volume received in accordance with the given "save percentage". It responds to the setting: "change the price"

StopOutPrice for MetaTrader 5

The script calculates Stop Out price (at this price position will be closed by broker) of the opened position and the price, at which Free Margin became negative (LockOut price)

EQUILIBRIUM-2011 for MetaTrader 5

Multicurrency "grider" with risk control (version for Automated Trading Championship 2011 and updated version)

Exposure for MetaTrader 5

This script reads all opened position and calculates their exposure for each currency

Forum

Strange result from OrderCalcMargin

Hello, I try to calculate expected profit (D) and margin requirement , but I get strange result in Tester. On Demo and Real account, it is OK. I use this code (Script) over account, and same as Expert in Tester : void OnStart () { double D= 0.01 // Volume * SymbolInfoDouble ( _Symbol