Attachments forums

Re: MT4 Indicator requests and ideas

srinarayani13, Thu Aug 27, 2026 9:01 pm

cladi53 wrote: Thu Aug 27, 2026 6:59 am The indicator it is just the cross of RSI and Moving Average. And thats all. And the setup is the same. the diference maybe is diffrent data provider generate the discrepance from trading view to MT4
Price Feed Differences
FXCM vs. Your MT4 Broker: At the top of the TradingView chart, you can see that the data comes from the FXCM provider (Gold Spot / U.S. Dollar - 5 - FXCM). In MT4, you are using the quote feed from your specific broker.

Impact on Candlesticks: Discrepancies in the Close, High, or Low prices between two different providers—even by just a few pips or points—alter the exact values ​​calculated by `iRSI()` in MT4 compared to `rsi()` in Pine Script. This results in subtle differences in the slope and amplitude of the lines during periods of consolidation or low volatility.
There is no hidden filtering or smoothing. The mathematical calculation in both scripts is exactly identical: TradingView (Pine Script v4): `sh = rsi(close, 34)` calculates a 34-period RSI based on the closing price; `ln = sma(sh, 68)` calculates a 68-period Simple Moving Average using the RSI values. MetaTrader 4 (MQL4): `iRSI(NULL, 0, 34, PRICE_CLOSE, i)` calculates the exact same 34-period RSI based on the close. The secondary loop sums the last 68 RSI values ​​and divides them by 68 (`sum / 68`), which is the exact mathematical definition of a Simple Moving Average (SMA). Both indicators process raw candlestick data in the same way, without applying any additional smoothing, volatility filters, or offsets. The reason the line appears "flatter" or more "muted" in MT4—rather than standing out as it does in TradingView—is solely due to the fixed vertical scale (0 to 100) and the area fill; however, the crossover points between the RSI and the SMA theoretically occur on the same candle, provided the closing prices on both platforms match.

Here is the modified code with automatic scaling, where the fixed scale of 0 to 100 has been disabled. maybe is better for your view
RSI Cross is giving lots of signal during sidewasy or low volatility, hence I am trying with rsi on ma, result are much better, 34 and 68 seeting will not work here, need to find working settings, this indicator does not have option to change RSI and MA values in inputs option, each time need to change it from mq4 file and compile

It will be easier if able to change RSI and MA value from inputs menu
All files in topic