Utkarsh Katiyar:
Hi I am trying to convert a pinescript code into mql5 but the indicator values that I am getting on mt5 terminal do not match to the Tradingview Indicator. Any help would be appreciated.
Probably you need:
hhBuffer[i] = iHigh(_Symbol, _Period, iHighest(_Symbol, _Period, MODE_HIGH, InpPeriod, i)); llBuffer[i] = iLow(_Symbol, _Period, iLowest(_Symbol, _Period, MODE_LOW, InpPeriod, i));
Thanks Stan. I tried it but it did not work, latest values are showing as zero. I have a feeling I might be going wrong somewhere in the below code:
if(rates_total<InpPeriod) return(0); int start; if(prev_calculated==0) start=0; else start=prev_calculated-1;
Current State after making the recommended changes:
Utkarsh Katiyar #:
Thanks Stan. I tried it but it did not work, latest values are showing as zero. I have a feeling I might be going wrong somewhere in the below code:
Current State after making the recommended changes:
Probably you need:
hhBuffer[i] = iHigh(_Symbol, _Period, iHighest(_Symbol, _Period, MODE_HIGH, InpPeriod, rates_total - 1 - i)); llBuffer[i] = iLow(_Symbol, _Period, iLowest(_Symbol, _Period, MODE_LOW, InpPeriod, rates_total - 1 - i));

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 I am trying to convert a pinescript code into mql5 but the indicator values that I am getting on mt5 terminal do not match to the Tradingview Indicator. Any help would be appreciated.
Pinescript Code:
MQL5 Code:
Screenshot for TradingView Indicator:
Screenshot from MT5: