question about iCustom()

 

hello MQL5 team,

as my EA code using iCustom() for importing indi buffers, I want to clear my doubt :

every Ontick events, ea re-calculate the indi buffer by  iCustom() from the beginning of whole time series

I want to know if I place the indi on chart,  whether it  reducing the amount of computation or not ? as the indi only re-calculate the latest bar.

 
when you use CopyBuffer in OnTick (EA), you only need to copy 1 bar, the indicators duty is to copy all bars needed and do the calculation work
 
Conor Mcnamara #: when you use CopyBuffer in OnTick (EA), you only need to copy 1 bar, the indicators duty is to copy all bars needed and do the calculation work

thanks for reply, I am using mt4. 

the only way to reduce is limit the count bar? maybe another ways ?

 
Your topic has been moved to the section: MQL4 and MetaTrader 4
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
 
noChangepromise1 #:

thanks for reply, I am using mt4. 

On MT4 when you call iCustom it loads the indicator (although you cannot see it on chart) and updates it per tick (It executes the indicator code which may only update latest bar). If iCustom is not called for quite some minutes it simply exits the indicator and releases resources.