Custom indicator and printing function to chart
There is a difference between the "handle" and the actual indicator value. You are printing out the value of the handle.
Read the manual on how to use the handle to get access to the indicator data. It involves copying the indicator data to an array and then using the values in that array.
Read help: iCustom
Please note: in MQL5, the indicator handle is created once (in OnInit). Then, to obtain the values, use CopyBuffer
- www.mql5.com
Hi excellent people,
I am using this indicator (Kaufman MQ5) https://www.mql5.com/en/code/351
I tried this code to print the function to the chart but I only got
-1
-1
-1
0
do you know what I'm doing wrong? This would work in MT4...
Code is below and here is the chart and data window (which shows the indicator's value appropriately)