How to get indicator data of a custom symbol

 

I've create a custom symbol ,like 5_second chart which is base on the tick data of XAUUSD. But there's no related functions like iMACD() to get the indicator data of this custom symbol, all of the Technical Indicator Function must be used with predefined standard timeframe.

So, is there a good method to solve this issue.THX.

Files:
2308.0300.jpg  743 kb
 
Your topic has been moved to the section: Technical Indicators
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
 
Documentation on MQL5: Technical Indicators / iCustom
Documentation on MQL5: Technical Indicators / iCustom
  • www.mql5.com
The function returns the handle of a specified custom indicator. Parameters symbol [in] The symbol name of the security, the data of which should...
 
Gan Zhi Zhong:

I've create a custom symbol ,like 5_second chart which is base on the tick data of XAUUSD. But there's no related functions like iMACD() to get the indicator data of this custom symbol, all of the Technical Indicator Function must be used with predefined standard timeframe.

So, is there a good method to solve this issue.THX.

You can apply any indicator to a custom symbol in the same way as with standard symbol. Use the same timeframe which you used in your generator of rates of the custom symbol.

If you mean that you have problems with updating indicators on 5-second's "micro-bars", shifting too guickly to the left, then yes - you need somehow to update them with higher frequency. Probably, you can find something useful in the blogpost, describing adaptation of a renko-indicator, which has similar problems with boxes, generated asynchronously with regular bars.

Tweaking renko indicators for testing and optimizing robots dependent on them
Tweaking renko indicators for testing and optimizing robots dependent on them
  • www.mql5.com
In the previous blogpost of the series dedicated to renko-driven trading systems we've discovered that MetaTrader 5 does not provide a native support for testing and optimization of trading robots
 
Stanislav Korotky #:

You can apply any indicator to a custom symbol in the same way as with standard symbol. Use the same timeframe which you used in your generator of rates of the custom symbol.

If you mean that you have problems with updating indicators on 5-second's "micro-bars", shifting too guickly to the left, then yes - you need somehow to update them with higher frequency. Probably, you can find something useful in the blogpost, describing adaptation of a renko-indicator, which has similar problems with boxes, generated asynchronously with regular bars.

I've dwelt on the non-standard timeframes of the custom symbol, and wanted  to abtain indicator data of it for my EA, which was loaded on a  XAUUSD M5 CHART.

As you said, the custom symbol can be created on a M1 chart. And  with the custom symbol name,your suggestion works good,like   handle=iMA("XAU5S",PERIOD_M1,50,0,MODE_SMA,PRICE_CLOSE); 

 It is a great help!appreciate that.