
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
The EA will not always open both pending buy and sell orders. I am not sure whether it is due to a fast moving market or the code is erroneous (it does compile). The orders are sent when the desired tick volume for the current bar have been reached.
The EA will not always open both pending buy and sell orders. I am not sure whether it is due to a fast moving market or the code is erroneous (it does compile). The orders are sent when the desired tick volume for the current bar have been reached.
The EA will not always open both pending buy and sell orders. I am not sure whether it is due to a fast moving market or the code is erroneous (it does compile). The orders are sent when the desired tick volume for the current bar have been reached.
So why not find out why and fix the issue ? why aren't you checking the return value from your OrderSend() calls ? if they fail you can then Print() the error and any variables that will help determine the problem, for example, Bid, Ask, Open price, SL, TP, etc.
This will help: What are Function return values ? How do I use them ?
Thanks for your reply. According to the experts journal in the terminal, it says invalid lots amount for OrderSend function. Doesn't make sense when the margin is there to open the order and it opened the pending sell but not the pending buy.
Check the return value from the OrderSend() if it shows the OrderSend() failed print the Error and relevant variables . . . including lotSize2 then you can check that value against MarketInfo() with MODE_MINLOT & MODE_LOTSTEP
So you get error 131 ? what does that have to do with margin ? if it was not enough money wouldn't you expect error 134 ?