Kedardiwan: I am trying to convert below pine script code to MQL5 but getting errors. One of the error is 'SetIndexStyle' - undeclared identifier . I have included include <indicator.mqh> but no joy.
Also, for SetIndexLabel(0, "UpBars"); , I am getting error 'SetIndexLabel' - undeclared identifier. I think I am missing some libraries. Could you please help ?
SetIndexStyle is a MQL4 function. For MQL5 use PlotIndexSetInteger.
You should read the entire section on Documentation on MQL5: Custom Indicators
And please stop using ChatGPT to generate your code. It does a horrible job.

Documentation on MQL5: Custom Indicators
- www.mql5.com
Custom Indicators - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi All,
I am trying to convert below pine script code to MQL5 but getting errors. One of the error is 'SetIndexStyle' - undeclared identifier . I have included include <indicator.mqh> but no joy.
Also, for SetIndexLabel(0, "UpBars"); , I am getting error 'SetIndexLabel' - undeclared identifier. I think I am missing some libraries. Could you please help ?
Thanks,
Kedar