Elite indicators :) - page 207

William Snyder
9496
William Snyder  
newtrader100:
And then last but certainly not least, resumption of hypothetical profitability.......

Nice idea Newtrader and Mladen adds some finishing touches on a manual setup i am working on, using the dig trend score on top with the stlm 2 tfs on bottom with separate special, really looks interesting how the separate special gets out of cycle sometimes before the turn..

Files:
digitals.gif 71 kb
newtrader100
105
newtrader100  
mrtools:
Nice idea Newtrader and Mladen adds some finishing touches on a manual setup i am working on, using the dig trend score on top with the stlm 2 tfs on bottom with separate special, really looks interesting in a grailish way how the separate special gets out of cycle 5 or more bars before the turn..

Thank you mrtools.

Please guys, keep up the great work.

Best regards to everyone!

Mladen Rakic
151209
Mladen Rakic  

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

newtrader100
105
newtrader100  

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.

Mladen Rakic
151209
Mladen Rakic  

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

newtrader100
105
newtrader100  

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!

bkennedype
60
bkennedype  

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:
Manu
81
Manu  

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,

William Snyder
9496
William Snyder  

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
Mladen Rakic
151209
Mladen Rakic  

:)

tools, as usual, the metatrader team does not care too much about simplicity and efficiency. Their code is anything but what they should show as an example of how to code and I guess that is why you are having problems with it.

So here is one (in 2 steps) : first the simplification (it takes 5 lines of code within the main loop to do the job) and then the nrp version (this one draws colors on over bought and over sold levels) Did it this way in order to make it obvious how the nrp step is added

__________________________________

PS: made an option to use a price in calculation (the same way as the built in metatrader cci), but to make it clear - anything other than a typical price ((High+Low+Close)/3 or CCIPrice parameter = 5) is by definition not a CCI

PPS - added the 3rd step too : the mtf

regards

Mladen

mrtools:
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

Updated version posted here : https://www.mql5.com/en/forum/general