• Get access

Volatility Quality Index - page 60

Solariz
382
Solariz  

From my personal opinion the "VQ.mq4" gives a lot of false signals.

But I found this "Volatility quality - zero line alrt.mq4" which seems to work better and I thought it may be worth a try to implement it into the EA. I don´t know where I have read it but it was said "any VQ" can be taken. Well, so I tried all weekend to make it running but without success.

The EA doesn´t give an error message but it seems to open trades whenever it feels like. Can someone of the experts be so kind to have a look at it? Would be really nice! I made changes to the code as shown in the screenshot. Did I forget something?

volatility_quality_expert_advisor_-zero_line_-_test-only.mq4

volatility_quality_-_zero_line_alrt.mq4

Robert
418
Robert  

Hi Gfuchs,

You can add PRINT and COMMENT statements with your iCustom lines to make sure you are getting the right values from your indicator...and these will also help confirm that your Buy/Sell strategies are working correctly.

Also...You only show 3 externs in the iCustom lines for the new indicator you added.

That indicator has 11 externs...and they all need to be added to the iCustom lines...

Hope this helps,

Robert

Solariz
382
Solariz  
cosmiclifeform:
Hi Gfuchs,

You can add PRINT and COMMENT statements with your iCustom lines to make sure you are getting the right values from your indicator...and these will also help confirm that your Buy/Sell strategies are working correctly.

Also...You only show 3 externs in the iCustom lines for the new indicator you added.

That indicator has 11 externs...and they all need to be added to the iCustom lines...

Hope this helps,

Robert

Hi Robert, thank you for your quick reply ! I wish I would understand your words...

I am not a coder. I just fight my way through by the help of "copy and paste"

Is the "11 externs" the crucial part ? Oh dear. No idea. You mean this ? :

"Volatility quality - zero line alrt",PriceSmoothing,PriceSmoothingMethod,Filter,alertsOn,alertsOnCurrent,alertsMessage,alertsSound,alertsEmail,alertNotification,soundfile,alertPrefix,3,i);

Mladen Rakic
163551
Mladen Rakic  
Gfuchs:
Hi Robert, thank you for your quick reply ! I wish I would understand your words...

I am not a coder. I just fight my way through by the help of "copy and paste"

Is the "11 externs" the crucial part ? Oh dear. No idea.

Gfuchs

The conditions for finding out when is the trend changing should be like this :

if(CntO(OP_BUY,Magic)>0)TL=1;if(CntO(OP_SELL,Magic)>0)TL=-1;for(int i=1;i<=limit;i++){

VQ1=iCustom(NULL,0,"Volatility quality - zero line alrt",PriceSmoothing,PriceSmoothingMethod,Filter,4,i);

VQ2=iCustom(NULL,0,"Volatility quality - zero line alrt",PriceSmoothing,PriceSmoothingMethod,Filter,4,i+1);

if(VQ2!= 1&&VQ1==1 ){if(Reverse)SV=1;else BV=1;break;}

if(VQ2!=-1&&VQ1==-1){if(Reverse)BV=1;else SV=1;break;}}

trend buffer can contain only 2 values +1 for trend u and -1 for trend down. When values of that buffer change it means that there is a new signal

Solariz
382
Solariz  
mladen:
Gfuchs

The conditions for finding out when is the trend changing should be like this :

if(CntO(OP_BUY,Magic)>0)TL=1;if(CntO(OP_SELL,Magic)>0)TL=-1;for(int i=1;i<=limit;i++){

VQ1=iCustom(NULL,0,"Volatility quality - zero line alrt",PriceSmoothing,PriceSmoothingMethod,Filter,4,i);

VQ2=iCustom(NULL,0,"Volatility quality - zero line alrt",PriceSmoothing,PriceSmoothingMethod,Filter,4,i+1);

if(VQ2!= 1&&VQ1==1 ){if(Reverse)SV=1;else BV=1;break;}

if(VQ2!=-1&&VQ1==-1){if(Reverse)BV=1;else SV=1;break;}}

trend buffer can contain only 2 values +1 for trend u and -1 for trend down. When values of that buffer change it means that there is a new signal

Dear Mladen, thank you very much for your help. I made the suggested changes and it seems to work ! I will do more testing and report.

Time to send you a bottle of champaign...once I am off the demo

Solariz
382
Solariz  
mladen:
Gfuchs

The conditions for finding out when is the trend changing should be like this :

if(CntO(OP_BUY,Magic)>0)TL=1;if(CntO(OP_SELL,Magic)>0)TL=-1;for(int i=1;i<=limit;i++){

VQ1=iCustom(NULL,0,"Volatility quality - zero line alrt",PriceSmoothing,PriceSmoothingMethod,Filter,4,i);

VQ2=iCustom(NULL,0,"Volatility quality - zero line alrt",PriceSmoothing,PriceSmoothingMethod,Filter,4,i+1);

if(VQ2!= 1&&VQ1==1 ){if(Reverse)SV=1;else BV=1;break;}

if(VQ2!=-1&&VQ1==-1){if(Reverse)BV=1;else SV=1;break;}}

trend buffer can contain only 2 values +1 for trend u and -1 for trend down. When values of that buffer change it means that there is a new signal

Dear Mladen, I still have a small problem with this EA. Would you mind helping me out again ?

Bar 1: Short signal (waiting for bar close)

Bar 2: Going short

Bar 3: Long signal (now I activate "Reverse = true" + "AddPositions = true" in the EA and press OK)

Now instead of being prepared to add another position on Bar 4, it closes the previous order from Bar 2...

Files:
problem2.jpg 85 kb
Mladen Rakic
163551
Mladen Rakic  
Gfuchs:
Dear Mladen, I still have a small problem with this EA. Would you mind helping me out again ?

Bar 1: Short signal (waiting for bar close)

Bar 2: Going short

Bar 3: Long signal (now I activate "Reverse = true" + "AddPositions = true" in the EA and press OK)

Now instead of being prepared to add another position on Bar 4, it closes the previous order from Bar 2...

Gfuchs

Maybe just one explanation : you can not use EAs as an extension to manual trading. The thing is that when you change parameters in an EA some other internal variables can be reset or they can still keep values from a previous way of trading. That is one of the reasons why it is always recommended that the parameters for an EA are changed with care or only when there are no opened orders - otherwise yo risk unpredictable ways of EA behavior

Solariz
382
Solariz  
mladen:
Gfuchs Maybe just one explanation : you can not use EAs as an extension to manual trading. The thing is that when you change parameters in an EA some other internal variables can be reset or they can still keep values from a previous way of trading. That is one of the reasons why it is always recommended that the parameters for an EA are changed with care or only when there are no opened orders - otherwise yo risk unpredictable ways of EA behavior

Oops, I didn´t know about that. I was playing with the settings all over the place. Thanks a lot for the explanation Mladen.

By the way. It seems that the above mentioned problem can be avoided as long as there is a non-signal bar inbetween two signals.

Mladen Rakic
163551
Mladen Rakic  
Gfuchs:
Oops, I didn´t know about that. I was playing with the settings all over the place. Thanks a lot for the explanation Mladen. By the way. It seems that the above mentioned problem can be avoided as long as there is a non-signal bar inbetween two signals.

yes, that is one way too, but for that you have to have all set up on your screen the same as it is set in the EA (so that you know visually when it is safe to do so)

rizkyd
59
rizkyd  
mladen:
Volatility quality zero line indicator (from this post : https://www.mql5.com/en/forum/general ) made as on chart bars version

need EA for this indicator pleaseee ...

rules see the picture ....

thanks

Files: