You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi Mr. Mladen
How do I get the last value of QuarterDailyWaves (A, B, C, D and so on) and the final value of QuarterDailySwings (1, 2, 3, 4 and so on)
Thank you in advance.
If I understand correctly your question, you can do that by using iCustom() function (using buffers 6 and 7 for that)
If I understand correctly your question, you can do that by using iCustom() function (using buffers 6 and 7 for that)
yes I know, but how do I get the last four values of the two Buffer (6 and 7)?
yes I know, but how do I get the last four values of the two Buffer (6 and 7)?
You can do it like this :
//
//------------------------------------------------------------------
#property indicator_chart_window
int init() { return(0); }
int deinit() { return(0); }
int start()
{
int i,count=0;
double waves[4],swings[4];
//
//
//
//
//
for(i = 0; i<Bars-1 && count <4; i++)
{
double wave = iCustom(NULL,0,"FX5_NeelyElliotWave_v1.2",6,i);
if (wave != 0) { waves[count] = wave; count++; }
}
count = 0;
for(i = 0; i<Bars-1 && count <4; i++)
{
double swing = iCustom(NULL,0,"FX5_NeelyElliotWave_v1.2",7,i);
if (swing != 0) { swings[count] = swing; count++; }
}
Comment("wave 0 : "+DoubleToStr(waves[0],Digits)+"\n"+
"wave 1 : "+DoubleToStr(waves[1],Digits)+"\n"+
"wave 2 : "+DoubleToStr(waves[2],Digits)+"\n"+
"wave 3 : "+DoubleToStr(waves[3],Digits)+"\n"+
"swing 0 : "+DoubleToStr(swings[0],Digits)+"\n"+
"swing 1 : "+DoubleToStr(swings[1],Digits)+"\n"+
"swing 2 : "+DoubleToStr(swings[2],Digits)+"\n"+
"swing 3 : "+DoubleToStr(swings[3],Digits));
return(0);
}hi mladen
how to create a boundary to calculate the bar so that the computer does not become slow.
example only count the bar in 1440, since when calculating the whole bar will make the computer too much.
hi mladen
how to create a boundary to calculate the bar so that the computer does not become slow.
example only count the bar in 1440, since when calculating the whole bar will make the computer too much.Simply replace the "Bars" in this line :
for(i=0;i<Bars-1&&count<4;i++)
with whatever maximum number of bars you wish to use
PS: if you limit the number of bars that are scanned for values, you might end up without having all the 4 desired values in the array
hi , does someone have this indicator for mq5? i only find this indicator for mq4.
Haven't seen the MQ5 version yet.