If I understand correctly, this is hedging advisor which will hedge all open orders if equity drawdown reaches certain percent?
I can see couple of problems:
1) you should update nSell and nBuy after ordersend
2) single "=" cannot be used for comparison. I don't know how this is done in mql, but in c++ "if ( nSell = nBuy )" will be executed following way:
nSell = nBuy;
if(true)
...
use this instead:
if ( nSell == nBuy )
I have no idea if this will help or not :) Need more source code.
If I understand correctly, this is hedging advisor which will hedge all open orders if equity drawdown reaches certain percent?
I can see couple of problems:
1) you should update nSell and nBuy after ordersend
2) single "=" cannot be used for comparison. I don't know how this is done in mql, but in c++ "if ( nSell = nBuy )" will be executed following way:
use this instead:
I have no idea if this will help or not :) Need more source code.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
hey guys, was wondering if anyone could correct my mistake here -
i want the code to read what types of orders are opened more - long's or short's - and then open an opposite trade, with an equal amount of lot sizes.
i know the build is wrong, for it checks the total number of trades, not the lotsizes, but ill fix that later - for now the issue is following -
when the X % percentage is reached, it just constantly opens trades, till it reaches maximum.
i presume i've managed to loop it, but dont know how to make it check for the condition once.
help much appreciated.