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
Hello Brian ...
You did a mistake ...
Just replace "Symbol()!=symb" by "symb" in the OrderSend( ) without using " " ...
Let me know how it goes ...
Always refers to the chart symbol.
If you want to use another symbol
Replace
with
Where X is the symbol integer from Marketwatch position.
Also realize that you can not use Ask and Bid because these also relate to the chart Symbol so use
Instead.
is this code for mq4 or mq5 or both?
To MQL4 since your original code is too.
Hello Brian ...
You did a mistake ...
Just replace "Symbol()!=symb" by "symb" in the OrderSend( ) without using " " ...
Let me know how it goes ...
Hi Osama
Thank you very much for all your help.
That worked perfectly.
Regards,
B
Let me summarize what I told you before ...
Once you enforce the EA to use Symb = "EURUSD" then it will not make any effect anywhere in the code if
you use Symb or "EURUSD" instead. The only importand line that must use "EURUSD" as the only allowed sybmol to
trade is the OrderSend ( ) function as it is the responsible one for opening the EURUSD order.
You may use ...
In case you want to display a custom text instead of "Symb" ... Just do the following ...
So, you will get the text "Allow to Trade only this Pair ..." instead of Symb while the code will use Symb itself.
Good luck ...