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
You need to use this construction (catch a new bar)
Hi, it is still opening multiple positions of the same currency pair once conditions are met. I have failed to catch the cause.
Hi, it is still opening multiple positions of the same currency pair once conditions are met. I have failed to catch the cause.
You are checking if there are trades open for the symbols in an array which are not necessarily the chart symbol.
You are not waiting for either loop to complete before checking for conditions to open a new trade with the chart symbol.
You are checking if there are trades open for the symbols in an array which are not necessarily the chart symbol.
You are not waiting for either loop to complete before checking for conditions to open a new trade with the chart symbol.
Checking out if the array is part of the chart symbols could be the solution. If you have time, please show me on that code how to add that part. I really appreciate all the help you guys have given me.
Checking out if the array is part of the chart symbols could be the solution. If you have time, please show me on that code how to add that part. I really appreciate all the help you guys have given me.
Why do you even need the array? Why not just check for the chart symbol and most important, complete the check before placing new trades.
Am I missing something?
Why do you even need the array? Why not just check for the chart symbol and most important, complete the check before placing new trades.
Am I missing something?
He needs an array, since he wants to trade with one Expert Advisor for several symbols.
Here is a version that opens one position at a time:
Why do you even need the array? Why not just check for the chart symbol and most important, complete the check before placing new trades.
Am I missing something?
He needs an array, since he wants to trade with one Expert Advisor for several symbols.
Well, I did miss that.
I just saw that he was checking through different symbols but then checking conditions and placing trades on the chart symbol.
So I thought that if he is only placing trades with the chart symbol, why the need to check whether other symbols have open positions?
It didn't make sense to me.
Here is a version that opens one position at a time:
Thank you very much. It is running one position per currency in the array. This way, I will manage to grow my small account.
Here is a version that opens one position at a time:
Hi all,
I really appreciate the help you have given me in learning MT5. I have the same problem of the code opening multiple positions of one currency pair. I have resorted to have separate EAs for each pair but still I have not really managed to solve the problem. Kindly have a look at the modification I did on the earlier code Vladimir did for me. I could love to have say only two active positions for EURUSD, two active positions for GBPUSD and so on. Thank you for your help.
Hi all,
I really appreciate the help you have given me in learning MT5. I have the same problem of the code opening multiple positions of one currency pair. I have resorted to have separate EAs for each pair but still I have not really managed to solve the problem. Kindly have a look at the modification I did on the earlier code Vladimir did for me. I could love to have say only two active positions for EURUSD, two active positions for GBPUSD and so on. Thank you for your help.
You make one and the same annoying mistake: you mix PENDIND ORDERS and POSITIONS into one heap.
Forget the word "order" and never use it again. Now your main word is "position". Use only the word "position" and, accordingly, functions that work with "positions".