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
I haven't done anything yet, I'm trying to compile this code:
This code compiles. Virtual and BestInterval were updated yesterday. You may have an older version.
It compiles without Virtual ,
it compiles without BestInterval too,
but it won't compile together.
What's that supposed to mean?
There is not another input parameter from your library.What do you mean by that?
There is not one more input parameter from your library.Forum on trading, automated trading systems and testing trading strategies.
Libraries: BestInterval
fxsaber, 2018.10.16 2:57 pm.
Virtual and BestInterval were updated yesterday. You may have an older version.
This code compiles. Virtual and BestInterval were updated yesterday. You may have an older version.
Thanks!
Updated Virtual, it compiles.
The Expert Advisor compiles, intervals for skipping are calculated, the file appears in Common.
But the inBestInterval_Action parameter is absent in the tester and does not appear either with or without VIRTUAL_TESTER.
Consequently, I cannot perform the test taking into account the thrown intervals.
I need help - what am I doing wrong?
The Expert Advisor is compiled, intervals for skipping are calculated, the file appears in Common.
But the inBestInterval_Action parameter is missing in the tester and does not appear either with or without VIRTUAL_TESTER.
Accordingly, there is no way to perform the test taking into account the thrown intervals.
I need help - what am I doing wrong?
VIRTUAL_TESTER is needed only to speed up Optimisation or reverse. That is why it is not prescribed to work with BestInterval
Forum on trading, automated trading systems and testing trading strategies.
Libraries: BestInterval
fxsaber, 2018.10.15 13:30
1. take any Expert Advisor and write these lines in its beginning
ZY It's good that you've figured out the code. If the libraries are in the same form as in KB, I don't know why. Perhaps you forgot to compile them when you removed VIRTUAL_TESTER.
fxsaber:
ZY It's good that the code has been sorted out. If the libraries are the same as in KB, I don't know why. Perhaps you forgot to compile them when removing VIRTUAL_TESTER.
I created a file TesterEA_mq4.mq5 with the following content:
TesterEA.mq4 file is original, from KB. Compiled normally.
MT4Orders, Virtual, BestInterval are fresh from KB.
I corrected EMA.mqh (an error of division by zero was popping up):
EMA( const int period ) : Alpha(1.0 / period), Value(0)
by
EMA( const int period ) : Alpha(2.0 / (period+1.0)), Value(0)
I tried in BestInterval.mqh instead of
make
BestInterval Action variable appears in the tester, with BestInterval Action=false everything is beautiful in the log, but with BestInterval Action=true the whole test runs and nothing about intervals is written in the log....
It's a pity... :)
I created the following file TesterEA_mq4.mq5:
TesterEA.mq4 file is original, from KB. Compiled it normally.
MT4Orders, Virtual, BestInterval are fresh from KB.
Fixed EMA.mqh ( division by zero error was popping up):
EMA( const int period ) : Alpha(1.0 / period), Value(0)
by
EMA( const int period ) : Alpha(2.0 / (period+1.0)), Value(0)
Zero period is an incorrect value. So division by zero is normal and is left on purpose to show that such a value cannot be set.
I tried in BestInterval.mqh instead of
make
BestInterval Action variable appears in the tester, with BestInterval Action=false everything is beautiful in the log, but with BestInterval Action=true the whole test runs and nothing about intervals is written in the log....
It's a pity... :)
Here is the source for Action
With Action = true, the same profit should appear in the Tester's report as was calculated in the log with Action = false.
For Action, this is the source code
With Action = true, the same profit should appear in the Tester's report as was calculated in the log with Action = false.
Nope, the stone flower does not come out... :)
In this form, when Action = true, it stops closing orders at all and immediately eats up all the margin with new orders (probably something with CloseBy)....
With Virtual.mqh disabled, everything works, but Action intervals are ignored.
And it's a challenge to understand your code more deeply... I think I'll pass for now. ;)
Nope, no stone flower coming out... :)
In this form, when Action = true, it stops closing orders at all and immediately eats up all the margin with new orders (probably something with CloseBy)....
I wouldn't be surprised if it was run on Netting. CloseBy does not work there.
With Virtual.mqh disabled, everything works, but Action intervals are ignored.
And it's a challenge to understand your code more deeply... I think I'll pass for now. ;)
Do it on the hedge. I didn't bother with netting, because MT4-advisor was not supposed to run in this mode, of course.
The algorithm of ignoring bad intervals is simple. The TS is launched in a virtual environment. The netting position of only those open positions that fit the calculated intervals is calculated there. Then it synchronises its netting position with the virtual one in the real environment. This is done in the most ugly way for analysis, but simple to implement - CloseBy.
Actually, Reverse-mode is implemented in the same way. I could rewrite the CloseBy variant to make it work on netting accounts as well. I was not busy with it.