Elite indicators :) - page 205

 

While working on "smoothed inverse fisher transform" I mentioned the origin of the rainbow wma, but then did not notice one thing : that we (metatrader users) still do not have a Rainbow oscillator which is a direct offspring of Rainbow moving averages (and Rainbow charts)

_________________________

So here it is. Attaching the original document from Mel Widner where he describes the both and the usage of the both. The only deviation is in colors : I used the usual colors for trends up and down (which is inverted from Widner used in his article) Apart from that it is 100% made as described by the author

 

Exciting stuff guys!

Although not a programmer, I'm coding some EA's using strategy builder software and have successfully used the "slope" indicator I include below. When blue it buys and when red it sells using the following as my guidance:

"First look at how the indicator paints, you see a line that changes color. In MT4 you do this using 2 lines, so one line is painted (signal) while the other one is not painted (no signal)

What we usually do is to print the signals value. In that indicator we added this:

Print( " utrend=",Uptrend[x], " dtrend=",Dntrend[x]);

Ans got this: - moment where the signals change

10:43:15 slope EURUSD,M1: utrend=2147483647 dtrend=1.2258

10:43:15 slope EURUSD,M1: utrend=1.2258 dtrend=2147483647

The big number is the way MT4 defines empty or no signal in this case. 2147483647 = EMPTY_VALUE or no signal

So utrend=2147483647 dtrend=1.2258 means there is a downtrend and

utrend=1.2258 dtrend=2147483647 means there is an uptrend.

The modes are defined by

SetIndexBuffer(0, Uptrend);

SetIndexBuffer(1, Dntrend);

Uptrend is mode 0, Dntrend is mode 1

Try creating a strategy and in a TA compare the signals. ind < 1000 means signal since ind is always around the price and when there is no signal it goes to 2147483647"

I would like to substitute the slope indicator with both the trendstrength and fast digital filter indicators, but I think they would have to be defined in the same way as the slope indi. - colored blue for buy and red for sell.

In other words, since I'm not a coder, if possible the same underlying mechanism for the slope indi. to be transfered to the other two indicators I mentioned and also included below so that I can plug them into the software and for it to recognize them as it did slope.

Thanks so much!

P.S. I included trendstrength and the jurik versions whichever is easier to change/better as above.

P.P.S. For reference, the swingline bars indicator was extremely easy to plug into the software and get correct buys and sells.

 

Newtrader100

Here is a "digital filters - on chart" adapted for usage from an EA

___________________________

Some things that need to be told :
First - the name : even though it still has the "on chart" in it, it is a separate window indicator. The "on chart" refers to the fact that those are moving average like filters and that they are normally drawn on chart

Second - why I did not add colors : that is the simplest and the hardest to explain. The simplest is that you do not need colors at all. All you have to know is if the trend up or down and did it change or not. Colors are there for visual trading and visual inspection (men are visual beings hence the need to see as much as it is possible - even adding colors is in that category) But as far as EAs are concerned colors do not mean anything and are ofter a cause for a problem. The problem comes from 2 reasons :

  1. repainting indicators (slope being one of those) as well as non repainting indicators must set value of 2 points (bars) in order to draw a line beginning. That means that one bar has a false signal and it is placed one bar before the fact (visually it is not so, but as far as computer is concerned, it is)
  2. non repainting indicators need 2 buffers for one extra color - that makes it complicated to "read" them and still the point 1 applies to them and makes them unusable for EA
So it look like this (satl in this case):

All you need is simple "binary value" indicator : this one sets value of drawing buffer to 1 when trend is up and -1 when trend is down. Left the multy time frame option in it even though you do not need that either for an EA (simply use the second parameter of iCustom() for a required time frame). In the case of this one all you have to do is something like the following :
double current = iCustom( ... , 0 , 0)

double previous = iCustom( ... , 0 , 1)

if (current != previous)

if (current==1)

buy ...

else sell ...
That is all. It will make the EA work efficiently and will prevent coding errors (the simpler the code the harder to make an error) and will prevent having false signals since the logic of it is as simple as it gets
___________________________

So, to conclude, often when adjusting some indicator for EA it probably needs to be simplified before being used in an EA. In the case of digital filters you could implement the trend finding logic in the EA itself but it would unnecessarily add code to EA (remember : simple, simple, simple ... ) when the work can easily be done in the indicator itself (check the differences and you will find out that essentially only 3 important lines of code are added to the "for EA" version - the rest is removed. If I have removed the multy time frame code from it it would be even simpler)

regards

Mladen

 

mladen,

I must have edited this post 4 times before I finally got it working perfectly.

The pure simplicity of it was staring me in the face the whole time but no, I had to complicate things for myself.

Took a break, reset the old brain and the keep it simple stupid answer came.

Preliminarily, it's great!!!

P.S. I have my suspicions that you have access to alien technology.

Thank you much and kind regards!

 

Had removed the indicator because thought maybe had got it from another area of forum which was untrue, upon retracing my steps, most of the code was gotten from public section and the rest from the elite section and that includes the alerts!!! Sorry for any inconvience caused.

 

Modify Weekly Pivot Indicator

I'm wondering if someone can modify this weekly pivot indicator to use the following formulas for the prior week range:

Range = high - low;

H4 = close + (Range * 1.1/2.0);

H3 = close + (Range * 1.1/4.0);

H2 = close + (Range * 1.1/6.0);

H1 = close + (Range * 1.1/12.0);

L1 = close - (Range * 1.1/12.0);

L2 = close - (Range * 1.1/6.0);

L3 = close - (Range * 1.1/4.0);

L4 = close - (Range * 1.1/2.0);

Thanks so much to anyone who might help.

Ben

Files:
 
mladen:
And one more digital filter, but this one is "special"

__________________________

It is special in a sense that it touches the essence of all that we are doing and looking for. There were, are and will be a lot of discussions if there are cycles in the market at all. There are arguments against it and there are arguments for it. Both sides seems to have their weak or strong points. This indicators can make you think at the least.

It starts like this :
And it does not look anything special ... until you place it on chart
As an explanation : the "non cycle line" is calculated as an average of cycles, not the other way around. First the cycles are found from prices and then, as a result of cycles found, an average (a simple moving average) is calculated. As you can see it rather good reflects the price itself, so, if nothing else, we should think again of the "are there cycles in the market or they aren't there"

__________________________

Well, now a pleasant rest of the weekend to all

Thanks a lot, Mladen!!

Made jurik versions, for those interested!

 

Rainbow Oscillator EA

Hi mladen,

I am doing an EA with Rainbow Oscillator you posted.

Here is the piece of code :

double RHUP1 = iCustom(NULL,0,"Rainbow oscillator","Current time frame",3,10,PRICE_CLOSE,true,2,1);//Rainbow up before

double RHUP2 = iCustom(NULL,0,"Rainbow oscillator","Current time frame",3,10,PRICE_CLOSE,true,2,0);//Rainbow up now

double RHDN1 = iCustom(NULL,0,"Rainbow oscillator","Current time frame",3,10,PRICE_CLOSE,true,3,1);//Rainbow down before

double RHDN2 = iCustom(NULL,0,"Rainbow oscillator","Current time frame",3,10,PRICE_CLOSE,true,3,0);//Rainbow down now

bool buyRain;

bool sellRain;

if (RHUP10) buyRain = true;

if (RHDN1>0 && RHDN2 <0) sellRain = true;

When I test back the EA, it shows the indicator at the end, which means that it's apparently well called, but it only makes short trades. No longs at all...

Can you tell me how I can change it ?

Thanks in advance,

Regards,

 

cci

Hi Mladen,

Looking in the code of Cci looks like it must repaint, wondering if you get a chance could you please check it out! Been trying to make a nrp version, but its kicking my butt

Best regards and Thanks in advance

tools

Files:
cci.mq4  4 kb
 

cci

Thanks Mladen and yes the code reminded me of some of those decompiled files !

Reason: