# Volatility Quality Index - page 61

4

163548

samirmfs:

### hello all my friend can you someone to give me indicator it's name Volaritility qualtity nrs - alerts et arrows but format mq4 not ex4 and thank you . Your friend Samir

Samir

Are you by chance looking for one of these : https://www.mql5.com/en/forum/general or maybe this one : https://www.mql5.com/en/forum/general

1232

Never knew that Thomas Stridsman invented it

37

hope you would like to help us solve the problem about the vq ea attached.

vq_indiea.rar

Files:
163548

vitoingletto:

hope you would like to help us solve the problem about the vq ea attached.

vq_indiea.rar

In your EA you are looking for last signal (that could happen a long time ago). First of all try using only 2 values : one for current direction and one for previous direction (buffer 6). When the value of the current bar changes compared to previous bar, then you have a signal. If the direction is 1, then it is a signal for buy, if the direction is -1, then the signal is for sell

________________

PS: no need for a loop in the EA to find the values of the direction. Simply use index 1 for first closed bar and index 2 for second closed bar (in order to work on signals based on closed bar)

37

Dear Mladen thank for the quick answer. Sorry but I am not a coder but if you suggest, in a more comprehensible way for my level, what I should do on the metaeditor I'll try to do myself. Sorry to say, but I don't even know what you intend with "buffer" .Thank again.

In your EA you are looking for last signal (that could happen a long time ago). First of all try using only 2 values : one for current direction and one for previous direction (buffer 6). When the value of the current bar changes compared to previous bar, then you have a signal. If the direction is 1, then it is a signal for buy, if the direction is -1, then the signal is for sell

________________

PS: no need for a loop in the EA to find the values of the direction. Simply use index 1 for first closed bar and index 2 for second closed bar (in order to work on signals based on closed bar)
163548

vitoingletto:
Dear Mladen thank for the quick answer. Sorry but I am not a coder but if you suggest, in a more comprehensible way for my level, what I should do on the metaeditor I'll try to do myself. Sorry to say, but I don't even know what you intend with "buffer" .Thank again.

vitoingletto

Try replacing this part :

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

if(VQ2>0&&VQ1<EMPTY_VALUE){if(Reverse)SV=1;else BV=1;break;}

if(VQ1>0&&VQ2<EMPTY_VALUE){if(Reverse)BV=1;else SV=1;break;}}

[/PHP]

With this :

if (VQCurrent!=VQPrevious)

{

if (VQCurrent== 1) if (Reverse) SV=1; else BV=1;

if (VQCurrent==-1) if (Reverse) BV=1; else SV=1;

}

37

Unfortunately doesn't work. It changes completely the logic and dosn't work in 1Mtf as it were in 5Mtf but, literaly in 1Mtf. Any suggestions? thank

vitoingletto

Try replacing this part :

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

if(VQ2>0&&VQ1<EMPTY_VALUE){if(Reverse)SV=1;else BV=1;break;}

if(VQ1>0&&VQ2<EMPTY_VALUE){if(Reverse)BV=1;else SV=1;break;}}

[/PHP]

With this :

if (VQCurrent!=VQPrevious)

{

if (VQCurrent== 1) if (Reverse) SV=1; else BV=1;

if (VQCurrent==-1) if (Reverse) BV=1; else SV=1;

}

163548

vitoingletto:
Unfortunately doesn't work. It changes completely the logic and dosn't work in 1Mtf as it were in 5Mtf but, literaly in 1Mtf. Any suggestions? thank

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)

163548

Also, in these two lines of the original EA :

if(VQ2>0&&VQ10&&VQ2<EMPTY_VALUE){if(Reverse)BV=1;else SV=1;break;}

there is a part that is not necessary. VQ2>0 and VQ1>0 is always true (EMPTY_VALUE is a positive value) and those two are not needed for comparison at all. It is enough to check if VQ1 or VQ2 are not equal to EMPTY_VALUE