I changed :
and it works. Only one problem, in backtest once opened two positions on the same bar with a 10 tp
any suggestions? thank.
It should nt have happened. There is a function (AddP()) that has to prevent that. What build of metatrader 4 are you using?
build 600, I just updated this morning.
as well in demo (and backtest) the ea opens with a retard of 3 minutes circa compared to real 5Mtf mtf-VQindicator signal(in 1Mtf) . How could be this possible? thank again.
That just might be a problem. Will have to check more to see what is exactly causing problems (now, with the new metatrader 4 nothing can be taken for granted)
hello Mladen. I discovered that the VQ indicator, when in 5Mtf mode but on a 1Mtf gives the signal with about 5 minutes retard.:) That probably means that it waits for the 5mtf candle to complete and after gives the signal inside the EA. It happens today on eur/usd with email signal activated. The mail were exactly 5 minutes late compared the arrows on the graph. Do you know if there is any way to modify this and makes possible for the mtf VQ indicator to give the signal at the same identical time that appear on graph? Thank. The original indicator is the one in this post https://www.mql5.com/en/forum/general
That depends on the index of the bar that you are testing. If the index is 1, than it is a first closed bar and then you can get some delay. But if you try to trade on a still opened bar you will end up with a lot of false signals and it will, in the end, be very dangerous to your account.
As a rule of thumb one should use signals on a closed bar. Very few systems are based on an opened bar
I don´t know your current settings, but in the EA you posted you didn´t only add "Steady" but also "RealTime".
And you have set "RealTime=true", meaning you will get multiple signals on an open bar. Set "RealTime=false" and the EA should only open a single order on a closed bar.
thank you Gfuchs , I didn't noticed that.... . I have done it and it works now.
Now if Gfuchs and Mladen have pleasure to carry on on this, I'd like to solve the problem of the indicator delay. What was sayed in post https://www.mql5.com/en/forum/general by Mladen is true but when I use the 5Mtf VQ(mtf)indicator in demo on 1m graphs (steady mode) the signal which appears after the first 1Mtf bar, until now, it was confirmed always in 5Mt. The difference, I think, is that on the lower tf we can spot earlier the signal (even one minute earlier of the 5Mtf graph closing bar is precious..). This could be done regardless the personal strategy that someone is using. Now with the new modification of the post https://www.mql5.com/en/forum/general the ea opens, in 1Mtf, correctly the signals of the 5Mtf VQ(mtf)indicator. Thank to Gfuchs we understand the it opens a single position too. But It opens with 5m delay. Same delay that you encounter on the mail notification. But, illogically (for me..), the visual arrow signal (steady mode) on 1Mtf graph appears before the 5M tf bar closure and it's the same arrow that, at the same time, appears on a 5Mtf graph with identical indicator and with identical set of the prior one on the 1Mtf graph . I think that the mail notification should be the same that gives to the EA the order to buy or sell. That because the EA (steady mode), with 5Mtf VQ(mtf)indicator in demo on 1m graphs opens with a delay, but compared to the EA(steady mode), with 5Mtf VQ(mtf)indicator in demo on 5m graphs opens exactly at the same time; but on 1Mtf the arrow appears much earlier than on the 5Mtf, still being the same. I ask again everybody. Any solution to make the indicator gives the signal at the same time it appears on 1Mtf? thank everybody for your time. Sorry for being so prolix...attached the ea modified>volatility_quality_expert_advisor_1.1.mq4
in the EA you have modified (v1.1) you still have set "RealTime=true"...
Hope this helps:
A VQ set to M5 and RealTime set to true. Now if you use this indi on a M1 chart then the indicator can change the signal various times during the building of 1 (minimum) to 5 (maximum) candles.
A VQ set to M5 and RealTime set to false. Now if you use this indi on a M1 Chart then a total of 5 candles in a row have to be closed before it gives you a signal.