Need some help with converting pine script to MQL5
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
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