You're welcome. I hope this MTF Moving Average indicator can speed up and simplify your trading analysis process.
thanks from me too. there is plenty of mtf averages on codebase, but all the others can make the chart very messy. And i like the addition of the horzontal lines, very smart.
Thank you for this code which I looked at a little.
I'm surprised at this part
for ( int i = rates_total - ma_Trail; i <= 0 ; i--) { ma_Buffer[i] = iMA ( _Symbol , MTF_period, ma_period, ma_shift, ma_method, applied_price); }
Could you give a little more detail on why you go directly from a handle to a data without going through a copybuffer?
For me, it's quite risky and non-standard
THANKS
Good morning
Thank you for this code which I looked at a little.
I'm surprised at this part
Could you give a little more detail on why you go directly from a handle to a data without going through a copybuffer?
For me, it's quite risky and non-standard
THANKS
Most of my code are purpose for simplicity, that's why if you see all my other indicator uploaded here, mostly using direct approach as possible. In this case, I avoid MT5 creates more copying of data in buffer.
Maybe the risk here if using large data history. But this indicator purpose is for user who need to limiting access history, thats why I add 'ma_Trail'.
So far, all calculation seems correct, but let me know if you found an issue here.
Most of my code are purpose for simplicity, that's why if you see all my other indicator uploaded here, mostly using direct approach as possible. In this case, I avoid MT5 creates more copying of data in buffer.
Maybe the risk here if using large data history. But this indicator purpose is for user who need to limiting access history, thats why I add 'ma_Trail'.
So far, all calculation seems correct, but let me know if you found an issue here.
Good morning
thank you for the explanations
I had done some research on my own, and indeed I saw that for ifunctions which only return a buffer, it was possible.
On the other hand, if more than one return buffer, this shortcut cannot work.
I haven't looked at the calculated values, but I don't see why they wouldn't be good. This is one of many MQL5 black boxes
Very personally, I don't think I would use this form of returning a value instead of a handle.
For error handling is something I don't want to lose sight of
Furthermore, we never know what a code may evolve towards, and these evolutions are not always possible in codes that are too concise.
Afterwards, as said, it's "personal"
Beautiful day
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
wd.Multi_LineMA:
The MT5 custom indicator, named "wd.Multi_LineMA.mq5," is designed to offer traders valuable insights into Moving Average values from a higher timeframe (MTF Multi TimeFrame). It encompasses additional visual features for in-depth analysis, such as the ability to view trails for a specified number of bars and a dynamic MA horizontal price line.
Author: Widy Prasetyo