Why won't this code work? Need help please.
I'm trying to get the value of a buffer out of an indicator using iCustom and displaying it's result in Object_Create label object but the result is always 1.00.
- MetaEditor - Professional editor of trading applications
- MQL5 Wizard: Development of trading robots for MetaTrader 5
- Technical analysis tools in MetaTrader 5
At first iCustom function creates an indicator and returns a handle (int). It isn't the same as indicator value. You should use CopyBuffer function to get indicator values.
At second it isn't good idea to use iCustom in OnCalculate function.
I think the source of Alligator indicator might be helpful for you.