Download MetaTrader 5

EA using with iCustom

To add comments, please log in or register
pmd30011991
8
pmd30011991  

Hi Guys


I'm manage to write a automated trading script when I using iCustom to load my custom indicator it's seem like get value once and that value didn't change if I put it in "Init" function

Then I try to put it in OnTick but I saw that script load indicator many times, I'm concerning about memory with this way.

Please enlighten me whether I using iCustom wrongly and there is any best way to deal with iCustom one time load ?

honest_knave
Moderator
2318
honest_knave  
pmd30011991:

Hi Guys


I'm manage to write a automated trading script when I using iCustom to load my custom indicator it's seem like get value once and that value didn't change if I put it in "Init" function

Then I try to put it in OnTick but I saw that script load indicator many times, I'm concerning about memory with this way.

Please enlighten me whether I using iCustom wrongly and there is any best way to deal with iCustom one time load ?


OnInit() will only run once. So the iCustom value will not update after that point.

You need to make the iCustom call every time you want to check the value.

Are you changing the arguments in your iCustom call frequently?

whroeder1
16104
whroeder1  
pmd30011991: Please enlighten me whether I using iCustom wrongly and there is any best way to deal with iCustom one time load ?
  1. How should we know? There are no mind readers here. We can't see your indicator code or the EA's. You should write a self documenting function instead of calling iCustom directly, see Detailed explanation of iCustom - MQL4 forum
  2. Changing the indicator's parameters in the call will load multiple copies.
To add comments, please log in or register