Thanks Alain, but my question was intended to be rhetorical. Thanks also for your good wishes. I feel sure I will need all the luck I can muster!The trouble is the multiplier differs from one instrument to another. Hard coding the numbers will prove to be a right pain in the proverbial posterior :(Adding an appropriate "input setting" is probably the least of several evils.
Beside asking to AMP to fix it or do it manually, you can also :
Grab the margin html webpage from AMP site, and parse it to collect the data you need.
Get the data directly from the exchange somehow.
Thanks again Alain,
I will ask AMP to ask MetaQuotes to fix it. Based on recent experience I don't have high hopes though!I wrote an HTML parser for "news" many moons ago, before such things were readily available over an API. I don't particularly want to go through that again though!I'll let you know if I get anywhere.I'm not getting lots of slippage on my stops thus far, so that's some small comfort at least!
I use MT5 for trading futures in AMP Futures but I can't run multiple EA well, so I ask for help in this article.
I find there is not a good way to resolve this problem.
So, I have a little suggestion can resolve it.
The Virtual Trading position folder.
Set a Virtual Trading position folder to control the order in this folder first.
After that if people turn on the real trading it will calculate the net position into the real markets.
I use 2 EA in MT5 to trade the same symbol "Micro Nasdaq" futures.
When the entry signal is true, those 2 EA will send order to the virtual trading folder in the toolbox like this:
So, we know there are 2 position in the same symbol "mnq.hot". After that we also know the netting position was 2 lots in mnq.hot.
At this moment, if user turn on the real trading option, MT5 will send 2 lots with mnq.hot to the real futures markets. like this:
If one of EA close its own position in "Virtual Trading" below:
It will get the netting position of mnq.hot 1 lots, the real account trading will close 1 lots to match the "Virtual Trading"
I find there is not a good way to resolve this problem. So, I have a little suggestion can resolve it. The Virtual Trading position folder. Set a Virtual Trading position folder to control the order in this folder first. After that if people turn on the real trading it will calculate the net position into the real markets.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.