- 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 :)
- 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!
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
hi,
can you modify this indicator to show only some timeframe and not all?
hi,
can you modify this indicator to show only some timeframe and not all?
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 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!
Hi tony,
Appreciate your work. Could you please write the same code for MT5 .. Thanks in advance ..
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
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.
Author: Claude Beaudoin