Mladen, would you kindly make alert for when two different settings - color deviations 7 and color deviations 14 for instance - both trigger on same bar or close equivalent?
(If possible same or different timeframes - just looking for concurrent triggers on same bar. Trades shown below taken by an EA I made with EA builder, but I have no idea about nuts and bolts coding, just putting logic blocks together.)
Try this one out. I did not clean it up just added a mtf functionality (the way it alerts is rather complicated so I left it as is and just made the basic part mtf able)
Can you make this MTF?
Something to toy with on weekend
A pleasant weekend to all
Thanks for the Hull MA variation indicator, mladen!
I have tried to integrate that indicator into your Trend envelopes (averages)-histo indicator.
For that I've added the ismooth function and the following function into the Trend envelopes (averages)-histo indicator.
double iHma_var(double price, double period, int i, int s=0)
double HalfP = HullPeriod/2.0;
double SqrtPeriod = MathSqrt(HullPeriod);
double price2 = iMA(NULL,0,1,0,MODE_SMA,HullPrice,i);
double step1 = iSmooth(price2 ,HalfP,HullPhase,i, 0);
double step2 = iSmooth(price2 ,HullPeriod,HullPhase,i,10);
When comparing the histogram with the Hull MA variation values I see that it is not 100% the same.
Could you please tell me where my mistake is?
I don't think you have an error or that you are making a mistake somewhere
if (Close>smax) trend= 1;
if (Close<smin) trend=-1;
Just one suggestion : if you are calling the function through the iCustomMA(...) then in the function you are already passing HullPeriod (the periodparameter in the function - it can be used instead of HullPeriod in the function) and price(you can use it instead of price2) and that way it will be shorter and more "integrated"
Thanks a lot Mladen !!!
Could you please, give me more explanations about parameters on mama indicator. Fast ma, slow ma...
Thanks in advance,
Shortest description of mama would be that mama is an adaptive ema. All the math there is used to determine what would be and "ideal" period for calculating ema in order to lag as little as possible.
The FastLimit and SlowLimit are there in order to limit ema within certain bounds. Fast limit of 0.5 is equivalent to ema(3) and slow limit of 0.05 is equivalent to ema(39). The "step" nature of it comes from those bounds: when it exceeds either of the bounds it is then corrected to stay within the bounds and that is one of the reasons why the "steps" are forming (the other (the main) is within the way how "ideal" period is calculated).
Many thanks mladen