ChartIndicatorsTotal not working in mql4

 

The code line below is expected to print out 1 since I have the Stochastic indicator attached. but it prints only the text "indicator short name is: "

Any idea how to get the short name of the indicator?


Print("indicator short name is: " + ChartIndicatorName(0,0,1));
Files:
Capture.PNG  27 kb
 
ChartIndicatorName(0,1,0)
string  ChartIndicatorName(
   long  chart_id,      // chart id
   int   sub_window,    // number of the subwindow
   int   index          // index of the indicator in the list of indicators added to the chart subwindow
   );
Reason: