- The trade give you which symbol.
- The magic number gives you which strategy.
- Comments can not be changed
Because slippage exists, you need to learn what it is.
Anil Varma:
I worked with multiple Expert Advisors and faced a similar issue before.Dear all
I have multi-symbol and multi-strategy EA which is running well.
I need assistance as how to place a comment in SL/TP hits to know which symbol/strategy it belongs.
I have been able to put comments on Entry / OrganicExits, but failing to do same on SL/TP.
Any guidance will be highly appreciated.
Regards
for that purpose i used the Magic Number to distinguish between different EAs and strategies,by assigning a unique Magic Number to each EA
Ayman Ramadan Soroor #:
I worked with multiple Expert Advisors and faced a similar issue before.
for that purpose i used the Magic Number to distinguish between different EAs and strategies,by assigning a unique Magic Number to each EA
I worked with multiple Expert Advisors and faced a similar issue before.
for that purpose i used the Magic Number to distinguish between different EAs and strategies,by assigning a unique Magic Number to each EA
HI Ayman
Thanks for the reply and suggestion.
Well I do use Magic No, but instead of EA, I set it for each strategy. Off recently I have noticed trade from one strategy is closed/exited by another strategy logic. Need to further explore the potential cause.
void CS5003SuperTrend::posTrailEXIT(void) { string vMethod = "[" + mSymbol + "] " + __FUNCTION__; int posCount = PositionsTotal(); //+---------------------------------------------------------------------------------------------------------------------------+ //| Itirate all open position(s) //+---------------------------------------------------------------------------------------------------------------------------+ for(int i = (posCount-1); i >= 0; i--) { ulong ticket = PositionGetTicket(i); // Get [i]th position's ticket number //+-------------------------------------------------------------------------------------------------------------------------+ //| Filter if ticket is for mSymbol and mMagicTPA_FTT. If not continue next position in the loop //+-------------------------------------------------------------------------------------------------------------------------+ if(PositionGetString(POSITION_SYMBOL) != mSymbol && PositionGetInteger(POSITION_MAGIC) != mMagic5003) continue; if(ticket > 0) { // [i]th Position found to process
Now this is closing trade from mMagic5002 strategy ...
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
Dear all
I have multi-symbol and multi-strategy EA which is running well.
I need assistance as how to place a comment in SL/TP hits to know which symbol/strategy it belongs.
I have been able to put comments on Entry / OrganicExits, but failing to do same on SL/TP.
Any guidance will be highly appreciated.
Regards