Download MetaTrader 5
To add comments, please log in or register
Do you want to become a well-known developer? Execute the orders of traders in the Freelance service!
Conner
21
Conner 2014.09.28 18:54 

Assuming all my trades have some StopLoss, how can I write a function that will determine if, given the direction (buy/sell), volume, and stoploss of a trade, it is possible to get a Stop Out.

For example, if I want to open a buy order when the Ask is 1.56432 with a stoploss at 1.56232 and a volume of 1 lot, the function should check all other open orders  and determine whether, in the event the price moves in the worst way possible for me, a Stop Out will be triggered and return a boolean accordingly.

Thanks in advance for your help.  I really appreciate it. 

SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI 2014.09.28 23:34  

Better try here ..

https://www.mql5.com/en/job

whroeder1
13619
whroeder1 2014.09.29 12:38  
math-trader: Assuming all my trades have some StopLoss, how can I write a function that will determine if, given the direction (buy/sell), volume, and stoploss of a trade, it is possible to get a Stop Out.
Compute free margin at the most extreme adverse excursion for all open orders. See my LotSize calculation. Posted my code Why is there NO Complete EA within the Code-Base? - MQL4 forum It has not been adjusted for Build 600+.
/
To add comments, please log in or register