• Join us

Volatility Quality Index - page 62

vito
37
vito  

done it!!!!

I changed :

for(int i=1;i<=limit;i++){

VQ1=iCustom(NULL,0,"VQ",Crash,TimeFrame,Length,Method,Smoothing,Filter,RealTime,Steady,3,i);

VQ2=iCustom(NULL,0,"VQ",Crash,TimeFrame,Length,Method,Smoothing,Filter,RealTime,Steady,4,i);

in

for(int i=1;i<=limit;i++){

VQ1=iCustom(NULL,5,"VQ",Crash,TimeFrame,Length,Method,Smoothing,Filter,RealTime,Steady,3,i);

VQ2=iCustom(NULL,5,"VQ",Crash,TimeFrame,Length,Method,Smoothing,Filter,RealTime,Steady,4,i);

and it works. Only one problem, in backtest once opened two positions on the same bar with a 10 tp

any suggestions? thank.

mladen:
vitoingletto Second parameter of the iCustom() call is the time frame parameter. In the case of the multi time frame indicators it is the best to use that parameter to make the indicator work in correct way. If the values when time frame is used as a second parameter of iCustom() call are not the same as when you pass it to indicator (in the TimeFrame parameter of the indicator) then the indicator does not work correctly in multi time frame mode (and that is the only case when they can differ)
Files:
2_position.jpg 243 kb
Mladen Rakic
163556
Mladen Rakic  
vitoingletto:
done it!!!!

I changed :

for(int i=1;i<=limit;i++){

VQ1=iCustom(NULL,0,"VQ",Crash,TimeFrame,Length,Method,Smoothing,Filter,RealTime,Steady,3,i);

VQ2=iCustom(NULL,0,"VQ",Crash,TimeFrame,Length,Method,Smoothing,Filter,RealTime,Steady,4,i);

in

for(int i=1;i<=limit;i++){

VQ1=iCustom(NULL,5,"VQ",Crash,TimeFrame,Length,Method,Smoothing,Filter,RealTime,Steady,3,i);

VQ2=iCustom(NULL,5,"VQ",Crash,TimeFrame,Length,Method,Smoothing,Filter,RealTime,Steady,4,i);

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?

vito
37
vito  

build 600, I just updated this morning.

mladen:
It should nt have happened. There is a function (AddP()) that has to prevent that. What build of metatrader 4 are you using?
vito
37
vito  

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.

vitoingletto:
build 600, I just updated this morning.
Mladen Rakic
163556
Mladen Rakic  
vitoingletto:
build 600, I just updated this morning.

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)

vito
37
vito  

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

mladen:
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)
Mladen Rakic
163556
Mladen Rakic  
vitoingletto:
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

vitoingletto

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

Solariz
382
Solariz  
vitoingletto:
...Only one problem, in backtest once opened two positions on the same bar...

vitoingletto,

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.

vito
37
vito  

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

Gfuchs:
vitoingletto,

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.
Solariz
382
Solariz  
vitoingletto:
...Now if Gfuchs and Mladen have pleasure to carry on on this, I'd like to solve the problem of the indicator delay.

vitoingletto,

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.