@Dario Capasso, please don't hijack someone else's thread, especially if it has nothing to do with your issue. Start your own new thread or find a thread that is relevant to your situation.
In answering your question, EA's should use a "magic number" to separate trades from other EAs and from manual trades so that their operations don't interfere with each other. Manual trades have a magic number of "0".
@Dario Capasso, please don't hijack someone else's thread, especially if it has nothing to do with your issue. Start your own new thread or find a thread that is relevant to your situation.
In answering your question, EA's should use a "magic number" to separate trades from other EAs and from manual trades so that their operations don't interfere with each other. Manual trades have a magic number of "0".
Oh ok sorry, i didn't want to take space to other for a my simple question but ok next time i will. So if the EA has not set a magic number it will interfere with other manual trades?
EA's by their nature of the code ALWAYS set a magic number which is usually defined in the parameter, so will normally not interfere, unless they purposely set it to "0".
If you are writing your own EA then take that into account.
EA's by their nature of the code ALWAYS set a magic number which is usually defined in the parameter, so will normally not interfere, unless they purposely set it to "0".
If you are writing your own EA then take that into account.
Do you mean in "input parameters" or is some defined implicit parameters somewhere ? I didn't set none "external" input parameters when started to create my EAs. And how i can find and change it?
- docs.mql4.com
This is the MQL5 section. You provided a link to the MQL4 function, which is not relevant.
When an order is placed, one of the required parameters is the "magic number". That parameter can be set with a constant value, but it is best for it to be set from an "input" parameter for the EA's properties.
no, I usually use this :
#include <Trade\Trade.mqh> //on tick bool Buy( double volume, // volum const string symbol=NULL, // symbol double price=0.0, // price double sl=0.0, // price stop loss double tp=0.0, // price take profit const string comment="" // comment //called with trade.buy(.....)
And works, dont require magic number
Don't just do things without fully understanding them ... Documentation on MQL5: Standard Library / Trade Classes / CTrade / SetExpertMagicNumber
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use