![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
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 authorExciting 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 : ___________________________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.![](https://c.mql5.com/forextsd/smiles/teeth_smile.png)
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
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 allThanks 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
![](https://c.mql5.com/forextsd/smiles/cry_smile.png)
Best regards and Thanks in advance
tools
cci
Thanks Mladen and yes the code reminded me of some of those decompiled files
!