Page 1 of 2

Trying to create a dual momentum indicator

Posted: Sat Aug 26, 2017 5:50 am
by traderduke
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 old momentum indicator

Re: Trying to create a dual momentum indicator

Posted: Sat Aug 26, 2017 6:02 am
by mladen
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

Posted: Sat Aug 26, 2017 7:14 am
by shreck
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.
:)

Re: Trying to create a dual momentum indicator

Posted: Sun Aug 27, 2017 6:20 am
by traderduke
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

Posted: Sun Aug 27, 2017 6:23 am
by traderduke
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

Posted: Sun Aug 27, 2017 6:41 am
by shreck
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.
:)

Re: trying to create a dual momentum indicator

Posted: Sun Aug 27, 2017 11:45 pm
by traderduke
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!

Re: trying to create a dual momentum indicator

Posted: Mon Aug 28, 2017 2:00 am
by shreck
Traderduke you are doing just fine.
Your thinking is the same as mine I will explain better on Monday.
Then we can share notes
Great job you have been doing.

Re: trying to create a dual momentum indicator

Posted: Tue Aug 29, 2017 2:10 am
by friend4you
RK-triple_smoothed_momentum_mladens.mq4
https://www.forex-station.com/download/ ... id=3318108
seems to be very useful. Can somebody code an alarm with a choosable alert file, when each line crosses zero?
Maybe some more options like filters or adjustable smoothing or adaptiveness would be a help.
Indicator is very popular in the systems area.

Re: trying to create a dual momentum indicator

Posted: Thu Aug 31, 2017 1:03 am
by traderduke