Scalp-Master Oscillator
Posted: Thu Aug 27, 2026 10:26 am
Hi traders, scalpers 
This indicator combines a Fast RSI and a Stochastic Oscillator into one window. This is a classic "pro" move for scalpers because it allows you to see both momentum and overbought/oversold conditions simultaneously without cluttering your chart.
The MQL4 Code (MT4)
Save this code as Scalp_Master_Osc.mq4 in your MQL4\Indicators\Custom\ folder.
This indicator combines a Fast RSI and a Stochastic Oscillator into one window. This is a classic "pro" move for scalpers because it allows you to see both momentum and overbought/oversold conditions simultaneously without cluttering your chart.
The MQL4 Code (MT4)
Save this code as Scalp_Master_Osc.mq4 in your MQL4\Indicators\Custom\ folder.
Code: Select all
//+------------------------------------------------------------------+
//| Scalp_Master_Osc.mq4|
//| Copyright 2024, ForexScalp|
//| https://forex-scalping.com|
//+------------------------------------------------------------------+
#property copyright "Forex-Scalping.com"
#property link "https://forex-scalping.com"
#property version "1.00"
#property strict
#property indicator_separate_window
#property indicator_minimum -100
#property indicator_maximum 100
// Plot settings
#property indicator_buffers 4
#property indicator_color1 clrLime // Fast RSI
#property indicator_color2 clrRed // Stochastic %K
#property indicator_color3 clrWhite // Stochastic %D
#property indicator_width1 2
#property indicator_width2 1
#property indicator_width3 1
//--- Input Parameters
input int InpRSIPeriod = 7; // Fast RSI Period (Default for Scalping)
input int InpStochK = 5; // Stochastic %K Period
input int InpStochD = 3; // Stochastic %D Period
input int InpStochSlow = 3; // Stochastic Slowing
input int InpOverbought = 80; // Overbought Level
input int InpOversold = 20; // Oversold Level
//--- Buffers
double BufferRSI[];
double BufferStochK[];
double BufferStochD[];
double BufferMidLine[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
SetIndexBuffer(0, BufferRSI);
SetIndexBuffer(1, BufferStochK);
SetIndexBuffer(2, BufferStochD);
SetIndexBuffer(3, BufferMidLine); // Hidden buffer for mid-line logic
IndicatorSetString(INDICATOR_SHORTNAME, "ScalpMaster_Osc (RSI+Stoch)");
// Draw Levels
IndicatorSetInteger(INDICATOR_LEVELS, 3);
IndicatorSetInteger(INDICATOR_LEVELVALUE1, 80);
IndicatorSetInteger(INDICATOR_LEVELVALUE2, 50);
IndicatorSetInteger(INDICATOR_LEVELVALUE3, 20);
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration |
//+------------------------------------------------------------------+
int OnCalculate(const inter_charts,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[])
{
int counted_bars = IndicatorCount1(0);
int limit = Bars - counted_bars;
if(limit > 0)
{
for(int i=0; i<limit; i++)
{
// Calculate RSI
BufferRSI[i] = iRSI(NULL, 0, InpRSIPeriod, PRICE_CLOSE, i);
// Calculate Stochastic
double stoch_k = iStoch(NULL, 0, InpStochK, InpStochD, InpStochSlow, MODE_SMA, 0, i);
double stoch_d = iStoch(NULL, 0, InpStochK