Re: Trying to create a dual momentum indicator

2
traderduke wrote: Sat Aug 26, 2017 5:50 am mladen
I was trying to combine 2 of your "smoothed_momemtum_mladens" for a crossed effect. I can only get buffer 0 to show, I'm sure some stupid syntax is missing.
I appreciate any help
Thank you
Ray

New dual
RK-dual_smoothed_momentum_mladens.mq4

old momentum indicator
smoothed_momentum_mladens.mq4
You are not looping the slow momentum calculation at all
Instead of this :

Code: Select all

   for(int i=limit; i>=0; i--) momentumf[i] = iMomentumF(iMA(NULL,0,1,0,MODE_SMA,MomentumPrice,i),MomentumLengthF,1,2,i);
                               momentums[i] = iMomentumS(iMA(NULL,0,1,0,MODE_SMA,MomentumPrice,i),MomentumLengthS,1,2,i);
Do like this

Code: Select all

   for(int i=limit; i>=0; i--)
   {
       momentumf[i] = iMomentumF(iMA(NULL,0,1,0,MODE_SMA,MomentumPrice,i),MomentumLengthF,1,2,i);
       momentums[i] = iMomentumS(iMA(NULL,0,1,0,MODE_SMA,MomentumPrice,i),MomentumLengthS,1,2,i);
   }       

Re: Trying to create a dual momentum indicator

3
traderduke wrote: Sat Aug 26, 2017 5:50 am mladen
I was trying to combine 2 of your "smoothed_momemtum_mladens" for a crossed effect. I can only get buffer 0 to show, I'm sure some stupid syntax is missing.
I appreciate any help
Thank you
Ray

New dual
RK-dual_smoothed_momentum_mladens.mq4

old momentum indicator
smoothed_momentum_mladens.mq4
Hello traderduke,
Another way to look at it is to have multiple selectable smothed_momentum indicator option inside one indicator (like ability to select option 1,2,3 with individual 1,2,3 options having on/off switch to make them show/or not appear on chart) with option to select separate periods for each, selectable multitimeframe and a single zero line cross alert function
Just thinking.
:)
Don't confuse My Confidence For Pride, And My Joy In What I Do For Arrogance

Re: Trying to create a dual momentum indicator

4
mladen, here is the dual MOM. I created a trend buffer for easy EA access. I made it "0.0001" & " -0.0001" so it would show well on the chart.
Thanks for the lesson, again
Ray
Shreck
Here is the EA, I finest it before I got the dual , so it has 2 moms doing the cross. Check out the notes at the top

EA Indicators, the RK in front only means I changed or created labels or trends. The basic indy calcs are the same:

Re: Trying to create a dual momentum indicator

5
shreck wrote: Sat Aug 26, 2017 7:14 am
Hello traderduke,
Another way to look at it is to have multiple selectable smothed_momentum indicator option inside one indicator (like ability to select option 1,2,3 with individual 1,2,3 options having on/off switch to make them show/or not appear on chart) with option to select separate periods for each, selectable multitimeframe and a single zero line cross alert function
Just thinking.
:)
Shreck
Were you suggesting a third mom, I'm afraid I don't understand??
Ray


Re: trying to create a dual momentum indicator

6
Yes add a third too period so you 3 seperate instances if needs be 6,14 and 30(26) with single zero line alert.
Alert switch should be separate for all 3.
That means each one has a separate setting to turn/off signal alerts.
For EA period 14 will be your exit signal while higher period will be your entry.
:)
Don't confuse My Confidence For Pride, And My Joy In What I Do For Arrogance

Re: trying to create a dual momentum indicator

7
shreck wrote: Sun Aug 27, 2017 6:41 am Yes add a third too period so you 3 seperate instances if needs be 6,14 and 30(26) with single zero line alert.
Alert switch should be separate for all 3.
That means each one has a separate setting to turn/off signal alerts.
For EA period 14 will be your exit signal while higher period will be your entry.
:)
Shreck
Here is a triple with trends to show when it cross's 0. I not sure about the alerts till the market opens. When I get a chance I will create an EA using the trends crossing 0. Let me know how it plays.
best of luck
Ray
both triple with and with out zero ;

WITH ZERO IS BROKE, I'LL GET BACK TO YOU LATER PSS; Have you ever seen mladen's triple MA, I added a pip diff to the Mid cross slow to cut out noise. Have a look! It could work with the new moms!


Who is online

Users browsing this forum: No registered users and 16 guests