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
Hi there,
i am looking to combine multiple strategies in one EA and have it trade the net position.
for example
the first pass requires a total position of 9 contracts: the EA buys 9
the next pass requires a total position of 10 contracts: the EA buys 1 (9+1=10)
the next pass requires a total position of 5 contracts: the EA closes 5 (10-5=5)
the next pass requires a total position of -5 contracts: the EA closes 5 and shorts 5 (5-5=0, 0-5=-5)
etc. etc.
(obviously the totals are hypothetical, trades are executed at market)
any help with the code to execute aggregated trades in this way would be much appreciated.
Thanks in advance,
Nick