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).
Generallty, position volume can be specified in the EnterVolume input parameter:
EnterVolume=0 (by default) - use volume and direction of current position;
EnterVolume>0 - perform calculation for long position with EnterVolume volume;
EnterVolume<0 - perform calculation for short position with EnterVolume volume.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
StopOutPrice:
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).
Generallty, position volume can be specified in the EnterVolume input parameter:
Author: Ivan Ivanov