Download MetaTrader 5

Indicators: Graphically display current trend for all time frames in one simple panel

To add comments, please log in or register
Use searching on MQL5.community. It is easy!
Automated-Trading
Admin
99871
Automated-Trading 2016.06.02 13:22 

Graphically display current trend for all time frames in one simple panel:

This is a graphical indicator based on slope-direction-trend indicator that has been published under several other forms.

SlopeDirection

Author: Claude Beaudoin

Mohammad Soubra
25013
Mohammad Soubra 2016.06.02 14:23  
Great 5stars
S JENKINS
74
S JENKINS 2016.06.09 18:52  


  • There are occasions when it doesn't fully load and is not even showing on the Indicator List
  • Doesn't like being part of a template

How is the 9 / 0 arrived at ?

Apart from that Good Job :)

Claude Beaudoin
1004
Claude Beaudoin 2016.06.11 00:56  
S JENKINS:


  • There are occasions when it doesn't fully load and is not even showing on the Indicator List
  • Doesn't like being part of a template

How is the 9 / 0 arrived at ?

Apart from that Good Job :)

 

Thanks for your comments.  I had not tried to attach it to a template but had to look into the template code (.tpl) file to figure it out.  When you save a template MetaTrader stores everything attached to the chart into the template file, including any objects you may have on the chart (trend lines, fibs, arrow, etc...).  The code I provided aborted if it failed to create one of it's objects.  Since MetaTrader re-creates the chart objects before loading any indicator, my code failed and exited.  I've removed the checks when it creates the objects to fix that.

As for it not fully loading, I've notice it does that when there is not enough history loaded for the given symbol on higher time frames.  I've added a check for this and it should be resolved.  I'd appreciate it if you could tell me if this happen again. 

The revised code is attached to the message (you need to go to the discussion section of the code in order to see the file.  Click here).

The 9 / 0 is the input values into the indicator.  9 is the barcount parameter and 0 is the smoothing method.  0 being simple, 1 = exponential, 2 = smoothed, 3 = Linear weighted.

BTW, I've made a little enhancement to the color of the arrows.  If the current trend is up for a given time frame but the current bid is below the trend value, the arrow will still be pointing up, but the color of the arrow will be red instead of green.  Same principal for a down trend.

Again, thanks for your comments.

Cheers! 

Files:
S JENKINS
74
S JENKINS 2016.06.12 15:49  
Claude Beaudoin :

The 9 / 0 is the input values into the indicator.  9 is the barcount parameter and 0 is the smoothing method.  0 being simple, 1 = exponential, 2 = smoothed, 3 = Linear weighted.

How is the 9 / 0 arrived at ? . . . I actually figured out the answer myself - Have you determined if these are the BEST settings

Appreciate you taking the time to make a good product even better :)

Will keep you informed

Lorenzo Sentino
261
Lorenzo Sentino 2016.11.17 17:17  

hi,

can you modify this indicator to show only some timeframe and not all? 

andy.troy
16
andy.troy 2016.11.17 22:38  
Cood
Claude Beaudoin
1004
Claude Beaudoin 2016.12.02 10:47  
Lorenzo Sentino:

hi,

can you modify this indicator to show only some timeframe and not all? 

With a little code modification you could modify it to only show the timeframes requested.
Trader_Tony
7
Trader_Tony 2017.03.28 16:43  

Hi Claude


Just loaded you indicator, seems to work well, i`m wondering what MA`s you use as basis for the trend assessment? Hope you don`t mind me asking in case it`s a trade secret.


All the best Tony

To add comments, please log in or register