Re: Velocity, Momentum & ROC Indicators for MT4

182
mwaschkowski wrote: Tue Nov 03, 2020 5:58 am

Hi MrTools!

I'm loving this momentum tool, its brilliant for finding entries/exits!

Would you mind letting me know what the enum is for the 'Color change on' parameter please?

Really appreciate it!

Mark
This?

Code: Select all

enum  enColorOn
      {
         cc_onSlope,                                         // Change color on slope change
         cc_onMiddle,                                        // Change color on middle line cross
         cc_onLevels                                         // Change color on outer levels cross
      };
input enColorOn          ColorOn         = cc_onSlope;       // Color change on :
These users thanked the author mrtools for the post (total 2):
mwaschkowski, talaate

Re: Velocity, Momentum & ROC Indicators for MT4

184
I have had an idea concerning Mladen's Smoothed Momentum indicator (once again haha).
I don't know if this would be a possible modification but if it is I think it could provide a new way to look at and use the indicator.
The modification I suggest is for there to be a colour change on INNER levels cross option.

Thank you for taking the time to read :)

Re: Velocity, Momentum & ROC Indicators for MT4

185
Ewan.M01 wrote: Wed Dec 16, 2020 6:00 am I have had an idea concerning Mladen's Smoothed Momentum indicator (once again haha).
I don't know if this would be a possible modification but if it is I think it could provide a new way to look at and use the indicator.
The modification I suggest is for there to be a colour change on INNER levels cross option.

Thank you for taking the time to read :)
On this version I have, the only inner level i have is the middle line, but think I'm not understanding what you're looking for.

PS: For the Histogram version of this indicator, please see: Smoothed Momentum Histogram indicator for MT4
These users thanked the author mrtools for the post (total 2):
alexm, 太虚一毫


Re: Velocity, Momentum & ROC Indicators for MT4

187
Hi MrTools,

Thanks for all the work you do! Its amazing!

I was about to create a post about the previous version of this indicator and issues I noticed when testing via the 15 min TF. I then tested again using this new version but there seems to be the same issue with both. I created a test case so that you can see exactly what I'm seeing in the hopes of getting to the bottom of this, please find attached.

I created a simple test case that shows arrows pointing up when the momentum is green and down when red. What I noticed was that on the 4hr chart everything looks good:
but when I did some back testing on the 15 min TF I saw this instead:
The code included testing using the step Nema indicator as well, (line 77) which was really just a sanity check (then nema code is commented out) just to compare the results. The the Nema indicator worked fine - results were the same both on the chart and in the backtest.

Please have a look and let me know what you think.

Edit: The dates tested are around Dec 16, 2020

Thank you,

Mark
mrtools wrote: Thu Dec 17, 2020 4:53 am

On this version I have, the only inner level i have is the middle line, but think I'm not understanding what you're looking for.

PS: For the Histogram version of this indicator, please see: Smoothed Momentum Histogram indicator for MT4

Re: Velocity, Momentum & ROC Indicators for MT4

188
mwaschkowski wrote: Mon Dec 21, 2020 3:49 am Hi MrTools,

Thanks for all the work you do! Its amazing!

I was about to create a post about the previous version of this indicator and issues I noticed when testing via the 15 min TF. I then tested again using this new version but there seems to be the same issue with both. I created a test case so that you can see exactly what I'm seeing in the hopes of getting to the bottom of this, please find attached.

I created a simple test case that shows arrows pointing up when the momentum is green and down when red. What I noticed was that on the 4hr chart everything looks good:

mom4hr.png

but when I did some back testing on the 15 min TF I saw this instead:

mom15minBacktest.png

The code included testing using the step Nema indicator as well, (line 77) which was really just a sanity check (then nema code is commented out) just to compare the results. The the Nema indicator worked fine - results were the same both on the chart and in the backtest.

Please have a look and let me know what you think.

Edit: The dates tested are around Dec 16, 2020

Thank you,

Mark

Think you need to check your iCustom calls, maybe this will help

Code: Select all

SetIndexBuffer(0, levup, INDICATOR_DATA); SetIndexStyle(0,DRAW_LINE);  //0 to 3 = levels
   SetIndexBuffer(1, levmi, INDICATOR_DATA); SetIndexStyle(1,DRAW_LINE);
   SetIndexBuffer(2, levdn, INDICATOR_DATA); SetIndexStyle(2,DRAW_LINE);
   SetIndexBuffer(3, mom,  INDICATOR_DATA); SetIndexStyle(3,DRAW_LINE,EMPTY,LineWidth,ColorNe); // 3 to 7 colors
   SetIndexBuffer(4, valua, INDICATOR_DATA); SetIndexStyle(4,DRAW_LINE,EMPTY,LineWidth,ColorUp);
   SetIndexBuffer(5, valub, INDICATOR_DATA); SetIndexStyle(5,DRAW_LINE,EMPTY,LineWidth,ColorUp);
   SetIndexBuffer(6, valda, INDICATOR_DATA); SetIndexStyle(6,DRAW_LINE,EMPTY,LineWidth,ColorDn);
   SetIndexBuffer(7, valdb, INDICATOR_DATA); SetIndexStyle(7,DRAW_LINE,EMPTY,LineWidth,ColorDn);
   SetIndexBuffer(8, valc); // trend;
These users thanked the author mrtools for the post:
mwaschkowski

Re: Velocity, Momentum & ROC Indicators for MT4

189
Oh my goodness, that does help. I used the Buffers explorer and found that buffer 8 is either +/- 1 if red or green and now everything is working as expected! Wow!

Here is the call that worked:

Code: Select all

//for Buy/green color of indicator
return iCustom(NULL,0,momName, tf,momentumPeriodFast,PRICE_CLOSE, lvl_floa, smoothMomfloatingLevelPeriodFast,90,10,3, type, clrLimeGreen, clrRed, clrKhaki, false, false, false, false, false, false, "", false, 8, i) == 1;
Thanks for the help, these custom calls seem to bite me in the butt too often!

Mark
mrtools wrote: Mon Dec 21, 2020 5:35 am

Think you need to check your iCustom calls, maybe this will help

Code: Select all

SetIndexBuffer(0, levup, INDICATOR_DATA); SetIndexStyle(0,DRAW_LINE);  //0 to 3 = levels
   SetIndexBuffer(1, levmi, INDICATOR_DATA); SetIndexStyle(1,DRAW_LINE);
   SetIndexBuffer(2, levdn, INDICATOR_DATA); SetIndexStyle(2,DRAW_LINE);
   SetIndexBuffer(3, mom,  INDICATOR_DATA); SetIndexStyle(3,DRAW_LINE,EMPTY,LineWidth,ColorNe); // 3 to 7 colors
   SetIndexBuffer(4, valua, INDICATOR_DATA); SetIndexStyle(4,DRAW_LINE,EMPTY,LineWidth,ColorUp);
   SetIndexBuffer(5, valub, INDICATOR_DATA); SetIndexStyle(5,DRAW_LINE,EMPTY,LineWidth,ColorUp);
   SetIndexBuffer(6, valda, INDICATOR_DATA); SetIndexStyle(6,DRAW_LINE,EMPTY,LineWidth,ColorDn);
   SetIndexBuffer(7, valdb, INDICATOR_DATA); SetIndexStyle(7,DRAW_LINE,EMPTY,LineWidth,ColorDn);
   SetIndexBuffer(8, valc); // trend;


Who is online

Users browsing this forum: alimpe2000, Bing [Bot], ChatGPT [Bot], DVanAssen, friend4you, PaperLi [Bot], Ruby [Bot], specialkey, Yandex [Bot] and 79 guests