Download MetaTrader 5

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

To add comments, please log in or register
Automated-Trading
Admin
110991
Automated-Trading  

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
33409
Mohammad Soubra  
Great 5stars
S JENKINS
74
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 :)

Claude Beaudoin
1316
Claude Beaudoin  
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  
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
376
Lorenzo Sentino  

hi,

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

andy.troy
2
andy.troy  
Cood
Claude Beaudoin
1316
Claude Beaudoin  
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  

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

Claude Beaudoin
1316
Claude Beaudoin  
Trader_Tony:

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


Hi Tony,

It's not a secret.  If you look at the code you'll see it's based on input parameters to determine the MA period and type.

//--- input parameters
extern int              BarCount = 9;
extern ENUM_MA_METHOD   Method   = MODE_SMA;

Do a search on "slope-direction-trend indicator" and you'll find other examples of the code.  I just wrapped it in a nice graphical format.

Cheers!

To add comments, please log in or register