how to edit Symbol() - page 2 12 New comment Osama Shaban 2016.05.05 16:25 #11 Hello Brian ...You did a mistake ... Just replace "Symbol()!=symb" by "symb" in the OrderSend( ) without using " " ...Let me know how it goes ... bah12ram 2016.05.06 17:08 #12 Marco vd Heijden: Always refers to the chart symbol.If you want to use another symbolReplace withWhere 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? Marco vd Heijden 2016.05.06 19:13 #13 bah12ram: is this code for mq4 or mq5 or both?To MQL4 since your original code is too. Brian 2016.05.10 12:48 #14 Marco vd Heijden: To MQL4 since your original code is too.Thanks Marco Brian 2016.05.10 12:49 #15 Osama Shaban: Hello Brian ...You did a mistake ... Just replace "Symbol()!=symb" by "symb" in the OrderSend( ) without using " " ...Let me know how it goes ... Hi OsamaThank you very much for all your help.That worked perfectly.Regards,B Osama Shaban 2016.08.05 14:38 #16 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 ...extern string Symb = "EURUSD"; or, input string Symb = "EURUSD"; In case you want to display a custom text instead of "Symb" ... Just do the following ...input string Symb = "EURUSD"; //Allow to Trade only this Pair ... So, you will get the text "Allow to Trade only this Pair ..." instead of Symb while the code will use Symb itself. Good luck ... Close open position with Discussion of article "The Electra EA ** Released 12 New comment
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 ...