Export Portfolio as Expert Advisor
Is there a way to export one portfolio as only one EA file? Because if I want to test 30-40s strategies I will have to add them manually on each chart, right? Or I am missing something. In MT4 is it called Multi-Instrument (trades several currencies on a single chart).
Thank you! If this is not possible it would be a very nice feature for SQ4!
Currently one strategy equals one EA, so with a 40 strategy portfolio, you will have 40 EA’s and 40 chart windows.
I don’t know if SQ4 will change this.
Thats a great idea BTW, +1!
In theory that sounds nice, but in reality it is impossible with MT4 because you can´t parallel execute orders with it from just one EA. MQL4 code is completely serial executed and can´t use any kind of parallel processing! Each trade has to be processed and confirmed by the broker (MT4 does not support aysnc OrderSend()) before the next line of code is called in the EA. So if you have 40 strategies in 1 EA and each one has a operation at each full hour (or each 30 minutes), it effectively means that it will have to execute the commands for strategy 1, then 2, then 3… it can´t send them in parallel from 1 EA. So it would look like this in reality, assuming each trade operation takes 1 second in total (example):
13:00:00 strategy 1 open short
13:00:01 strategy 1 set stop loss
13:00:02 strategy 2 open short
13:00:03 strategy 2 set stop loss
…now repeat this for all 40 strategies and 80 seconds have passed until strategy 40 has executed / modified it´s order. The market can move a lot in 80 seconds and so the backtests especially of strategy #40 will never match the live trading since you´ll get completely different entry prices because of these delays, especially during high volatility. The only way to reliable trade a portfolio with MT4 is to use 1 EA for each single strategy and a max of 8 EAs per MT4 instance for the reason explained here: https://strategyquant.com/forum/topic/4429-bug-or-problem-on-my-vps-lagging-i-got-a-lot-of-terminals-and-eas-working-on-my-vps-but-sometimes-sltp-not-set-on-the-order-why/#entry16155
It is true, the EA I have is working on a single strategy and it opens orders on several pairs. I thought there is a way to do the same with multiple strategies (so all I need to do if i want to forward test several strategies is to run several mt4 clients, right?).
Just use 8 EAs max per terminal and open as many terminals as needed and you´ll be fine and also never get a busy trade context.
Viewing 6 posts - 1 through 6 (of 6 total)