Hello,
Since the pairs trading backtest isn't working properly for you, I assume you are using MT4. MT4 doesn't support this.
You should use MT5 for pairs trading. Generally speaking, you can enter the symbol EURUSD for the "Buy" block and the symbol GBPUSD for the "Short" block.
Posts made by Lacone
-
RE: Trade two currency pairs simultaneouslyposted in Questions & Answers
-
RE: How do I find the highest and lowest levels for each Monday?posted in Questions & Answers
Hello,
Here is the calculation within the EA. On Tuesday, the High and Low from Monday are calculated and displayed as a line. -
RE: Backtesting/demo testing different behaviorposted in Questions & Answers
I mean the terminal variables (global variables).
If handled incorrectly, these can read in incorrect values, in Live Trading.
The Bucket of Positions blocks also didn't work properly for me on MT5, in my opinion. -
RE: Backtesting/demo testing different behaviorposted in Questions & Answers
Do you use terminal variables in the EA?
-
RE: Show swap in chartposted in Questions & Answers
Hello,
you can query it with a loop and display it in the chart with comments.
I have sent you a private message. -
RE: Valid structure?posted in Questions & Answers
Hallo MT4 Nutzer,
du kannst beliebe Strukturen mit beliebigen Blöcken erstellen.
Solange sich mindestens in einer Struktur 2 verbundene Blöcke befinden. Ein Block alleine wird nicht berechnet.
Gruß Lacone -
RE: Buy and Sellposted in General Discussions
Hello,
in the “No Trade” block you did not enter a symbol for the Specified Symbol.
Either enter a symbol or set it to “Any Symbol”. -
RE: Total Orders Count both Pending order and running tradesposted in Questions & Answers
After closing, the variable (counter) is set back to zero
-
RE: Total Orders Count both Pending order and running tradesposted in Questions & Answers
t does not need to be added in a formula, as the counter in the separate trees counts the pending orders and open positions together.
This means that no matter where the counter is used, with each pass (activating from the output of the "Counter Buy" variable), one is always added (+1). -
RE: Total Orders Count both Pending order and running tradesposted in Questions & Answers
Hello.
Here is the EA for MT4.
There you can see that a variable has been created (under Variables) and how it is used for counting.
Test2.ex4
Test2.mq4 -
RE: Total Orders Count both Pending order and running tradesposted in Questions & Answers
Hello.
Here is a working and validated example EA.
Since I don't know the condition less than 30, I simply used greater than 30 in the system.
Please run it once in the visual strategy tester.
There you can see that all 30 trades (pending and open) are closed.
Greetings
Lacone
Test2.mq5 -
RE: I need helpposted in General Discussions
Hello,
the keyword +2 pips creates the error.
Enter in points for Adjust (+0.0002) -
RE: Global variablesposted in Questions & Answers
@ alhammed
Global variables are only used in special cases.
Global variables are saved in the terminal.
When the EA is closed, the variable remains saved.
One application is when a timestamp must be retained so that the timestamp can be read when the EA is inserted again.
Otherwise, always use the normal variables. These are always saved in the EA and are set or recalculated when the EA is restarted. -
RE: My first MT5 optimization on fxDreema...and the fisrt issue!posted in Questions & Answers
@iPod
Thanks for the tip.
I noticed that too.
After I deactivated 4 threads, it was about 3.2 GB per thread. -
RE: My first MT5 optimization on fxDreema...and the fisrt issue!posted in Questions & Answers
Hello.
Unfortunately, the error also occurred on PC2 with 32GB and 12 threads. I didn't change the EA.
The RAM per thread is probably valid.
You can see it in the Windows Task Manager.For testing, I deactivated 4 threads so that more RAM is available per thread.
The optimization then worked and the error didn't occur.My next steps.
- Revise the fxDreema program
- When optimizing with long histories, no real ticks, but every tick or 1min OHLC.
- Increase the RAM when you get the chance.
@ TipsyWisdom
Thank you for your tips and information.
I don't use the optimization to find the best parameter, but to test the robustness of the trading system.
But that's more to do with the topic of "How do I create a trading system?"
Like your tips.
One more note. It's not about the trading system. The EA works in live trading and in backtesting and visual backtesting.
It's just about the error "not enough memory for tick generation", which only occurs when optimizing with real ticks and long histories. -
RE: My first MT5 optimization on fxDreema...and the fisrt issue!posted in Questions & Answers
Hello everyone.
I would also like to contribute something to analyzing the error.
Because I have had this problem for a while.
I only use Metatrader5.
My EA consists of 162 blocks and includes 3 timeframes and account queries.
1.
When optimizing with real ticks, the optimization stops and the following error is displayed. Optimization from 01/01/2020
“tested with error "no memory for ticks generating (test events error)"
During live trading, with fast ticks and only one EA, the CPU rose to 100%
The problem was the long code and nesting when updating.
With 1min OHLC, the optimization works.I revised the EA and use the “once per minutes” block before each tree with multiple blocks.
Now the optimization worked for real tick and live trading.
In the backtest there was only a small deviation between the EA with on ticks and once per minutes.- After a small change to the EA, the optimization did not work again.
Now I have created the EA once with fxDreema. And once via the Metatrader Editor (compilation).
I found that the file of the EA in fxdreema is larger than the EA in the Metatrader Editor. The results in the backtest are identical.
The backtest in the Metatrader Editor ran about 50% faster.
When optimizing only 16 tasks, the EA generated by Metatrader worked. The EA generated by fxdreema did not work.
With more than 16 tasks during optimization, the EA generated by Metatrader no longer worked either.Now I have carried out a test on a different computer.
Previous PC:
16 GB RAM and 4 threads
Second PC:
32 GB and 12 threadsNow the optimization worked with real ticks and 640 tasks during optimization, without any problems.
CONCLUSION
Currently, the PC is the weakest link when it comes to optimizing MT5 with real ticks.
I think fxdreema is a great structured program for logical programming.
I am aware that fxdreema has to generate a much longer code than a hand-programmed EA. This is also the case with competing programs.
But it still has to be applicable.
Perhaps fxdreema can say something about it itself.
Otherwise, I would send the text to support again.
Perhaps it would be possible to provide a list of which blocks and their links should be avoided.
And which ones use the most resources, such as loops and account queries over a longer period of time.Best regards
Lacone - After a small change to the EA, the optimization did not work again.
-
RE: Validation of the programmed system.posted in Questions & Answers
Hello.
It works, thank you for your help.Best regards
-
Validation of the programmed system.posted in Questions & Answers
Hello,
I would like to check programmed calculations that are in variables and what the result is.
How can I display the variable in the strategy tester in the visualization.
I would be grateful for an example.
Thanks