Please fix this indicator or EA - page 63

 
mladen:
Same examples as in my previous post except that in this case it is Volatility quality nrp - alerts & arrows. Picture tells more than thousand words

The values are the same, when you coded your version you must have re-written the problem code, excellent work. Do you think it will work OK with the EA?

 
litplum:
The values are the same, when you coded your version you must have re-written the problem code, excellent work. Do you think it will work OK with the EA?

litplum

All that I am showing is that the indicator works correctly as far as muti time frame is concerned. The rest depends on the EA

 
mladen:
litplum All that I am showing is that the indicator works correctly as far as muti time frame is concerned. The rest depends on the EA

Fair enough Mladen, your a great guy and I've learned a bit more. I'll give it a go and let you know how I get on. Thanks (yet again) for your help.

Cheers!

 

Hi Mladen,

I purchased the Volatility Quality NRP - alerts & arrows indicator, but I can't get it to work with the Volatility Quality Expert Advisor v2.01 EA, do you think you could have a look at it for me.

Sorry to be a pest, but something like this is way beyond my capabilities.

Thanks

 
litplum:
Hi Mladen,

I purchased the Volatility Quality NRP - alerts & arrows indicator, but I can't get it to work with the Volatility Quality Expert Advisor v2.01 EA, do you think you could have a look at it for me.

Sorry to be a pest, but something like this is way beyond my capabilities.

Thanks

litplum

If you are trying to determine when is the trend of Volatility quality changing as entry or exit points, you can use something like this snippet :

double currentTrend = iCustom(NULL,timeFrameYoUse,"Volatility quality nrp - alerts & arrows","",Length,Method,Smoothing,Filter,4,0);

double previousTrend = iCustom(NULL,timeFrameYoUse,"Volatility quality nrp - alerts & arrows","",Length,Method,Smoothing,Filter,4,1);

if (currentTrend!=previousTrend)

{

if (currentTrend== 1) ... // code for buy

if (currentTrend==-1) ... // code for sell

}

If you wish to test the closed bar, replace the 0 and 1 in shit of the iCustom() calls to 1 and 2

 
mladen:
litplum

If you are trying to determine when is the trend of Volatility quality changing as entry or exit points, you can use something like this snippet :

double currentTrend = iCustom(NULL,timeFrameYoUse,"Volatility quality nrp - alerts & arrows","",Length,Method,Smoothing,Filter,4,0);

double previousTrend = iCustom(NULL,timeFrameYoUse,"Volatility quality nrp - alerts & arrows","",Length,Method,Smoothing,Filter,4,1);

if (currentTrend!=previousTrend)

{

if (currentTrend== 1) ... // code for buy

if (currentTrend==-1) ... // code for sell

}

If you wish to test the closed bar, replace the 0 and 1 in shit of the iCustom() calls to 1 and 2

Thanks Mladen, I'm assuming the snippet replaces the main signal in the EA, but when I do I'm getting all sorts of compile errors.

 
litplum:
Thanks Mladen, I'm assuming the snippet replaces the main signal in the EA, but when I do I'm getting all sorts of compile errors.

litplum

You have to replace this part :

if (currentTrend== 1) ... // code for buy if (currentTrend==-1) ... // code for sell

Wit your real code. It is there just to explain what as to be done in each case. Ther rest of the code is a real code, but I doid not know what and how you do in cases when signals are there

 
mladen:
litplum

You have to replace this part :

if (currentTrend== 1) ... // code for buy if (currentTrend==-1) ... // code for sell
Wit your real code. It is there just to explain what as to be done in each case. Ther rest of the code is a real code, but I doid not know what and how you do in cases when signals are there

I'd like the EA to trade as follows:

When the VQ signals trend changes on the higher tf, I want the EA to close any existing trade and open a new trade on the lower tf, at the close of the lower tf bar that the signal came on. Only 1 trade open at a time. NOTE: The signal bar on the lower tf must close above the signal for it to be a buy or below the signal for a sell. (I hope that's clear enough).

Thanks

OK, it's compiled with no problems and seems to be trading OK.

Thanks Mladen, I'll run it overnight and let you know how I get on.

 
litplum:
I'd like the EA to trade as follows:

When the VQ signals trend changes on the higher tf, I want the EA to close any existing trade and open a new trade on the lower tf, at the close of the lower tf bar that the signal came on. Only 1 trade open at a time.

Thanks

litplum

Please read this post : https://www.mql5.com/en/forum/general

Happy trading

 

PS: replace this code in your EA

double VQB=iCustom(NULL,0,"Volatility Quality",Crash,TimeFrame,Length,Method,Smoothing,Filter,RealTime,Steady,Color,Alerts,EmailON,SignalPrice,SignalPriceBUY,SignalPriceSELL,CountBars,3,i);

double VQS=iCustom(NULL,0,"Volatility Quality",Crash,TimeFrame,Length,Method,Smoothing,Filter,RealTime,Steady,Color,Alerts,EmailON,SignalPrice,SignalPriceBUY,SignalPriceSELL,CountBars,4,i);

if(VQB>0&&VQB0&&VQS<EMPTY_VALUE)SSEL="true";

[/PHP]

with this one

[PHP]string SBUY="false";

string SSEL="false";

double currentTrend = iCustom(NULL,TimeFrame,"Volatility quality nrp - alerts & arrows","",Length,Method,Smoothing,Filter,4,0);

double previousTrend = iCustom(NULL,TimeFrame,"Volatility quality nrp - alerts & arrows","",Length,Method,Smoothing,Filter,4,1);

if (currentTrend!=previousTrend)

{

if (currentTrend== 1) SBUY="true"; // code for buy

if (currentTrend==-1) SSEL="true"; // code for sell

}

and it should work (it will compile OK)

Reason: