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;