Re: Wave trend Oscillator

11
mladen
I realize that the color change option offers a very nice visual but only option 4 controls the trend buffer. I respectfully request either an ADDED trend buffer sayyyy maybe 14 or re-setup 13 for option1.

I have several of your indicators with 2 & 3 trend buffers, One in particular, 3ma-3.03, I use a lot. So am I asking for something unattainable or is this indicator of a peculiarity that it can't be done.

I apologize if my request was of such a scrambled nature as to confuse the request.

cl_slope, // Change color on slope change -0
cl_sign, // Change color on signal line cross -1 I respectfully request either an added trend buffer sayyyy 14 or use 13
cl_mid, // Change color on zero level cross -2
cl_inc, // Change color on inner levels cross -3
cl_out // Change color on outer levels cross -4 controls the buffer 13

Thank You
Ray

see attached with option 4




Re: Wave trend Oscillator

12
traderduke wrote: Tue Apr 25, 2017 4:15 am mladen
I realize that the color change option offers a very nice visual but only option 4 controls the trend buffer. I respectfully request either an ADDED trend buffer sayyyy maybe 14 or re-setup 13 for option1.

I have several of your indicators with 2 & 3 trend buffers, One in particular, 3ma-3.03, I use a lot. So am I asking for something unattainable or is this indicator of a peculiarity that it can't be done.

I apologize if my request was of such a scrambled nature as to confuse the request.

cl_slope, // Change color on slope change -0
cl_sign, // Change color on signal line cross -1 I respectfully request either an added trend buffer sayyyy 14 or use 13
cl_mid, // Change color on zero level cross -2
cl_inc, // Change color on inner levels cross -3
cl_out // Change color on outer levels cross -4 controls the buffer 13

Thank You
Ray

see attached with option 4



4-24-2017 1-46-59 PM-WT-crossH_L level.png
In order to help and in order to clarify (once again)
The code that controls the trend buffer :

Code: Select all

               switch (ColorOn)
               {
                  case cl_slope : 
                        trend[i] = trend[i+1];
                        if (wtos[i]>wtos[i+1]) trend[i]= 1;
                        if (wtos[i]<wtos[i+1]) trend[i]=-1;
                        break;
                  case cl_sign :
                        trend[i] = trend[i+1];
                        if (wtos[i]>signal[i]) trend[i]= 1;
                        if (wtos[i]<signal[i]) trend[i]=-1;
                        break;
                  case cl_mid:                     
                        trend[i] = 0;
                        if (wtos[i]>levmi[i]) trend[i]= 1;
                        if (wtos[i]<levmi[i]) trend[i]=-1;
                        break;
                  case cl_inc:                     
                        trend[i] = 0;
                        if (wtos[i]>levup2[i]) trend[i]= 1;
                        if (wtos[i]<levdn2[i]) trend[i]=-1;
                        break;
                  default:                     
                        trend[i] = 0;
                        if (wtos[i]>levup1[i]) trend[i]= 1;
                        if (wtos[i]<levdn1[i]) trend[i]=-1;
                        break;
               }
As you can see, each and every value of that option can and is changing the trend buffer value
Please revise your code and check what your code is doing

All the best

Re: Wave trend Oscillator

13
mladen wrote: Mon Apr 24, 2017 5:43 am Ray

I have no idea what are you doing from your code
This is what is in buffer N0,13

Hi, What is the indicator showing buffers nicely, where to find it please?

Kiko

wave trend.png


As you can see, there are no hidden states. If the value is 1, then the trend is up. If the value is -1, then the trend is down, Otherwise the value is 0

Re: Wave trend Oscillator

15
Hi mladen and all members,
This is my first message here :)
I am looking for some help with the iCustom for this indicator "Wave trend oscillator 1.5" (I am only starting to learn some MQL4 basic stuff)

With the mq4 is easier because I can recompile the code with my settings and this way I don't have to pass any parameter. But for this indicator I don't have the mq4 (and I understand because some stupid people are renaming and reselling mladen and other's work!) so my question is about the parameters for this indicator.

In order to pass parameters, where I fail is when a lot of options are available. Do I have to pass a string, a position (starting from 0), or a enum ? For example, I want to change the parameters "current", EMA and price typical

current could be "current", 0, or PERIOD_CURRENT
EMA could be "Exponential moving average" or option 1 in the list
price typical could be pr_typical, "Typical" or option 5 in the list

For pr_typical I found it from other mq4 files and I guess your are using the same enum enPrices in this indicator.

Could you provide a correct iCustom with this example on buffer 13 :

iCustom(NULL,0,"Wave trend oscillator 1.5",PERIOD_CURRENT,4,4,"Exponential moving average",4,"pr_typical","2.0",0,"Filter the value",60,53,-60,-53,"Change colour on outer levels cross",false,false,false,false,false,false,2,159,159,true,13,i);


Thanks in advance.
Have a nice day!


Re: Wave trend Oscillator

16
makiel wrote: Wed Jun 28, 2017 7:13 pm Hi mladen and all members,
This is my first message here :)
I am looking for some help with the iCustom for this indicator "Wave trend oscillator 1.5" (I am only starting to learn some MQL4 basic stuff)

With the mq4 is easier because I can recompile the code with my settings and this way I don't have to pass any parameter. But for this indicator I don't have the mq4 (and I understand because some stupid people are renaming and reselling mladen and other's work!) so my question is about the parameters for this indicator.

In order to pass parameters, where I fail is when a lot of options are available. Do I have to pass a string, a position (starting from 0), or a enum ? For example, I want to change the parameters "current", EMA and price typical

current could be "current", 0, or PERIOD_CURRENT
EMA could be "Exponential moving average" or option 1 in the list
price typical could be pr_typical, "Typical" or option 5 in the list

For pr_typical I found it from other mq4 files and I guess your are using the same enum enPrices in this indicator.

Could you provide a correct iCustom with this example on buffer 13 :

iCustom(NULL,0,"Wave trend oscillator 1.5",PERIOD_CURRENT,4,4,"Exponential moving average",4,"pr_typical","2.0",0,"Filter the value",60,53,-60,-53,"Change colour on outer levels cross",false,false,false,false,false,false,2,159,159,true,13,i);


Thanks in advance.
Have a nice day!
Here are all the enums that are used in that indicator :

Code: Select all

enum enPrices
{
   pr_close,      // Close
   pr_open,       // Open
   pr_high,       // High
   pr_low,        // Low
   pr_median,     // Median
   pr_typical,    // Typical
   pr_weighted,   // Weighted
   pr_average,    // Average (high+low+open+close)/4
   pr_medianb,    // Average median body (open+close)/2
   pr_tbiased,    // Trend biased price
   pr_tbiased2,   // Trend biased (extreme) price
   pr_haclose,    // Heiken ashi close
   pr_haopen ,    // Heiken ashi open
   pr_hahigh,     // Heiken ashi high
   pr_halow,      // Heiken ashi low
   pr_hamedian,   // Heiken ashi median
   pr_hatypical,  // Heiken ashi typical
   pr_haweighted, // Heiken ashi weighted
   pr_haaverage,  // Heiken ashi average
   pr_hamedianb,  // Heiken ashi median body
   pr_hatbiased,  // Heiken ashi trend biased price
   pr_hatbiased2  // Heiken ashi trend biased (extreme) price
};
enum enColorOn
{
   cl_slope, // Change color on slope change
   cl_sign,  // Change color on sinal line cross
   cl_mid,   // Change color on zero level cross
   cl_inc,   // Change color on inner levels cross
   cl_out    // Change color on outer levels cross
};
enum enFilterWhat
{
   flt_prc,  // Filter the price
   flt_val,  // Filter the value
   flt_sig,  // Filter the signal value
   flt_prv,  // Filter the price and value
   flt_prs,  // Filter the price and signal
   flt_siv,  // Filter the value and the signal
   flt_all   // Filter all
};
enum enMaTypes
{
   ma_sma,    // Simple moving average
   ma_ema,    // Exponential moving average
   ma_smma,   // Smoothed MA
   ma_lwma,   // Linear weighted MA
   ma_tema    // Triple exponential moving average - TEMA
};

Re: Wave trend Oscillator

17
Thanks for you answer. It works now as I wanted with the correct enums :)

This is what I used in your indicator above Buffer Explorer 2 at line 57

if (BufferNumber1>=0)
Buffer1 = iCustom(NULL,0,IndicatorName,PERIOD_CURRENT,4,4,1,4,5,2,0,1,0,60,53,-60,-53,4,false,false,false,false,false,false,2,159,159,false,13,i);

instead of
if (BufferNumber1>=0)
Buffer1 = iCustom(NULL,0,IndicatorName,13,i);

Unfortunately it makes MT4 freezing or very slow and increase memory.
I am doing something wrong in iCustom as without parameters it works better ?
Do you think it's possible to make a lighter version for EA of Wave trend oscillator 1.5 ? if not possible no problem :)

Thank you :)

Re: Wave trend Oscillator

18
makiel wrote: Thu Jun 29, 2017 12:16 am Thanks for you answer. It works now as I wanted with the correct enums :)

This is what I used in your indicator above Buffer Explorer 2 at line 57

if (BufferNumber1>=0)
Buffer1 = iCustom(NULL,0,IndicatorName,PERIOD_CURRENT,4,4,1,4,5,2,0,1,0,60,53,-60,-53,4,false,false,false,false,false,false,2,159,159,false,13,i);

instead of
if (BufferNumber1>=0)
Buffer1 = iCustom(NULL,0,IndicatorName,13,i);

Unfortunately it makes MT4 freezing or very slow and increase memory.
I am doing something wrong in iCustom as without parameters it works better ?
Do you think it's possible to make a lighter version for EA of Wave trend oscillator 1.5 ? if not possible no problem :)

Thank you :)
You are passing some of the parameters wrongly
When you use the iCustom() call without parameters, it uses all the defaults - that is why it works OK
Try the following : add parameters 1 by one, and then you shall be able to see when the parameter you just added causes problem

Re: Wave trend Oscillator

19
Hi again
I tried adding parameters 1 by one as you advised and I also changed PERIOD_CURRENT by 0 and now it seems to work fine

iCustom(NULL,0,IndicatorName,0,4,4,1,4,5,2,0,1,0,60,53,-60,-53,4,false,false,false,false,false,false,2,159,159,false,13,i);

At least MT4 not freezing anymore and I can still check buffer 13 with values trend 1, 0, -1
Thanks for you help!

Re: Wave trend Oscillator

20
makiel wrote: Thu Jun 29, 2017 3:08 am Hi again
I tried adding parameters 1 by one as you advised and I also changed PERIOD_CURRENT by 0 and now it seems to work fine

iCustom(NULL,0,IndicatorName,0,4,4,1,4,5,2,0,1,0,60,53,-60,-53,4,false,false,false,false,false,false,2,159,159,false,13,i);

At least MT4 not freezing anymore and I can still check buffer 13 with values trend 1, 0, -1
Thanks for you help!
Happy trading :)


Who is online

Users browsing this forum: No registered users and 22 guests