Hull moving average indicator arrow display upon slope change problem

 

Hi all,

I can't seem to figure out how to display an arrow only upon the immediate slope change (i.e. change in colour of the current slope) candle, and not again until the slope changes once more.

How would one go about doing so?

Files:
HULL.mq4  11 kb
UNDESIRED.png  12 kb
DESIRED.png  8 kb
 
Imaad Fakier:

Hi all,

I can't seem to figure out how to display an arrow only upon the immediate slope change (i.e. change in colour of the current slope) candle, and not again until the slope changes once more.

How would one go about doing so?

Are you trying code it by your own without sufficient coding expertise ?

required "CUSTOM/VTLS.mqh" include file for to work and to check/test it

 
mntiwana:

Are you trying code it by your own without sufficient coding expertise ?

required "CUSTOM/VTLS.mqh" include file for to work and to check/test it

I have sufficient coding expertise.

Furthermore, below is a screenshot of the function you need to include in the necessary file. After you've done so, I await your feedback with a potential solution, thank you!

is_new_candle() function

Documentation on MQL5: Constants, Enumerations and Structures / Named Constants / Predefined Macro Substitutions
Documentation on MQL5: Constants, Enumerations and Structures / Named Constants / Predefined Macro Substitutions
  • www.mql5.com
//| Expert initialization function                                   | //| Expert deinitialization function                                 | //| Expert tick function                                             | //| test1                                                            |...
 
Imaad Fakier:

I have sufficient coding expertise.


Furthermore, below is a screenshot of the function you need to include in the necessary file. After you've done so, I await your feedback with a potential solution, thank you!

What actually you are looking for and or trying to form something

 
mntiwana:

What actually you are looking for and or trying to form something

If you run the program(s) and see the current outcome and then proceed to look at the screenshot named UNDESIRED.png that I attached in my first post when creating this topic, you'll see that a multitude of arrows are shown upon the slope change (i.e. the colour change from red to green and vice-versa), which is not what I want. However, the desired outcome, as can be seen in the attached screenshot named DESIRED.png, is what I am trying to achieve.

You understand?

 

"HMA nrp alerts + arrows + snd"

Here is Mladen's extended code of HUll,enhanced by Mrtools,sound option by file45

PS : for to equalize with your posted one,set methods to LWMA,price to close,speed to 2


5 methods supportive

22 price options

3 state display option

shift option

line width option

full alerting package

full arrowing package

interpolated mtf


1

p

 
mntiwana:

"HMA nrp alerts + arrows + snd"

Here is Mladen's extended code,enhanced by Mrtools,sound option by file45


5 methods supportive

22 price options

3 state display option

shift option

line width option

full alerting package

full arrowing package

interpolated mtf


Amazing! I’ll see what I can replicate in my HULL MA INDI with Mladen’s extended code and Mrtools’ enhancements of Mladen’s extended code.

Thank you Mntiwana!
 
mntiwana:

"HMA nrp alerts + arrows + snd"

Here is Mladen's extended code of HUll,enhanced by Mrtools,sound option by file45

PS : for to equalize with your posted one,set methods to LWMA,price to close,speed to 2


5 methods supportive

22 price options

3 state display option

shift option

line width option

full alerting package

full arrowing package

interpolated mtf


Mntiwana, I have a question or, rather, this question goes out to anyone who can answer it.

So, I’ve been trying to make an iCustom function call from the HULL_PRECISION indicator that I attached above which would check if the slope is up or if the slope is down and, subsequently, draw an up arrow or a down arrow.

Although, when making the iCustom function call using Mladen’s extended code and Mrtools’ enhancements of Mladen’s extended code, I find that there are still multiple arrows being displayed when the slope is up or down.

Now, just to make it clear, the HULL INDI is a separate INDI which will just draw the different coloured lines on the chart and my HULL PRECISION INDI is the INDI which will display when there is a slope change from up to down and vice-versa.

Could the problem be that the HULL INDI has two functions - i_plot_point() and i_clean_point() - because those two functions are responsible for the corresponding colour change relevant to the current slope change.

Is this why it is proving difficult for me to display arrows upon an immediate change in slope via an iCustom function call in another INDI (i.e. HULL PRECISION INDI), or is there something more to it?
 
Imaad Fakier:
Mntiwana, I have a question or, rather, this question goes out to anyone who can answer it.

So, I’ve been trying to make an iCustom function call from the HULL_PRECISION indicator that I attached above which would check if the slope is up or if the slope is down and, subsequently, draw an up arrow or a down arrow.

Although, when making the iCustom function call using Mladen’s extended code and Mrtools’ enhancements of Mladen’s extended code, I find that there are still multiple arrows being displayed when the slope is up or down.

Now, just to make it clear, the HULL INDI is a separate INDI which will just draw the different coloured lines on the chart and my HULL PRECISION INDI is the INDI which will display when there is a slope change from up to down and vice-versa.

Could the problem be that the HULL INDI has two functions - i_plot_point() and i_clean_point() - because those two functions are responsible for the corresponding colour change relevant to the current slope change.

Is this why it is proving difficult for me to display arrows upon an immediate change in slope via an iCustom function call in another INDI (i.e. HULL PRECISION INDI), or is there something more to it?

To make my question clearer, I have added visuals.

PERFECT INDI OUTCOME:

PERFECT INDI OUTCOME

UNDESIRED EA ICUSTOM FUNCTION CALL OUTCOME:

UNDESIRED EA ICUSTOM FUNCTION CALL OUTCOME

What is the problem?????

I have sat for hours and hours trying to figure this out as to why the INDI will have the desired outcome but an iCustom function call within my EA to do the exact same thing, but this time create an ellipses object instead of initialising the buffer, does not have the desired outcome.

Can anyone help me or point me in the right direction on how to find a solution to this aggravating problem?

Files:
HULL.mq4  13 kb
HULL_TEST.mq4  6 kb
Reason: