global wrote:Thanks for coding and making MPTM available Steve. I was testing it for managing multiple trades simultaneously in different pairs on different timeframes so I attached the EA to each chart. I set it to ManageAllTrades but should I instead set ManageAllTrades to false and set ManageByMagicNumber to true plus set a different magic number for each new chart I attach it too so that the multiple MPTM instances would not interfere with each other?
If it is necessary to set a different magic number for each new chart/timeframe I attached it to then is there some code I can add to the EA so it creates a new magic number automatically for each new instance of MPTM?
I'm new to EAs so I hope you can forgive my ignorance. Thanks.
Hi Global,
hope i can help a little.
For what you are describing here, i think you must NOT set 'managealltrades', but rather, 'managethispaironly". MAnaging all trades will manage everything on the platform, read the guide and the code in the mql4 editor and you'll see the warnings.Its all there.
The magics are usually '1' for each and any pair that MPTM takes a position for regardless of original trades magic. Careful with these magics, i dont know of a script to change the way MPTM issues them and would'nt like to play with the code too much.
EG, if you want to control a trade on EURUSD, you must attach the main EA on a chart that only trades EURUSD, and then on another EURUSD chart, attach MPTM with 'managethispaironly' as true. Then check the rest of the parameters that they dont clash down the road with another setting. You'll get strange errors. That way you keep these this pair on its own. DO the same for the rest of the pairs you want to trade.
I dont know the effect of the magics though. never tried trading using magics.
cuz