Page 1 of 2

Stop Using Default MACD for Scalping! (My Custom Settings for 1m & 5m Charts)

Posted: Fri Nov 06, 2026 7:04 pm
by PTScalper
Hi traders, scalpers,

If you are dropping the standard 12-26-9 MACD onto a 1-minute chart and wondering why you keep getting stopped out, here is the hard truth: that default setting was built by Gerald Appel in the 1970s for weekly charts. By the time a 12-26-9 crossover confirms on a 1-minute timeframe, the momentum shift you were trying to scalp is usually already over.

Scalping is about executing on immediate momentum and minimizing your time in the market. To do that, you have to speed up your Moving Average Convergence Divergence (MACD) to track micro-trends. After testing dozens of parameters, here are the three custom settings I use to reduce lag and catch the meat of short-term intraday moves.

The "Speed Demon" for 1-Minute Charts: 5-35-5This is my absolute go-to for high-frequency scalping in volatile markets.

Fast EMA (5): Hugs immediate price changes and reacts instantly to momentum bursts.

Slow EMA (35): Provides just enough of a smoothing baseline to filter out random chop.

Signal Line (5): Ultra-responsive to short-term momentum changes.

How to trade it: This setting thrives on 1-minute charts. You are looking for rapid line crossovers in the direction of the macro trend. Because this setting is hyper-sensitive, you will get more signals, which means maximum trading opportunities but also a higher risk of false signals. You must have strict risk management and take profits at the first sign of the momentum weakening.

Re: Stop Using Default MACD for Scalping! (My Custom Settings for 1m & 5m Charts)

Posted: Fri Nov 06, 2026 7:06 pm
by PTScalper
The "Balanced Approach" for 5-Minute Charts: 8-17-9If the 1-minute chart gives you too much anxiety, moving to the 5-minute chart with these parameters is the sweet spot for most day traders.

Fast EMA (8): Still quick enough to catch the start of a 5-minute candle run.

Slow EMA (17): Slow enough to keep you from getting whipped around by normal market noise.

Signal Line (9): The standard smoothing line to confirm the shift.

How to trade it: This setup strikes a fantastic balance of speed and reliability. Use it alongside key support and resistance levels. A crossover floating in the middle of nowhere is risky, but an 8-17-9 crossover bouncing off a known support level on the 5-minute chart is a high-probability setup.

The "Fast Crossover Test": 5-13-5If you want something faster than 8-17-9 but less extreme than 5-35-5, this setup is excellent for short intraday holds.

The Setup: It heavily weights recent price action to give you crossover signals much earlier than the default.

The Tradeoff: Because it is so fast, the extra turnover means you will pay more in spread and commissions. This is strictly for highly liquid markets (like the S&P 500 or major forex pairs) where slippage is minimal.

Re: Stop Using Default MACD for Scalping! (My Custom Settings for 1m & 5m Charts)

Posted: Fri Nov 06, 2026 7:07 pm
by PTScalper
My Golden Rules for MACD Scalping

Never use MACD in isolation: A fast crossover is meaningless if it is fighting the broader trend. Use a 15-minute or hourly chart to establish your directional bias, and only take 1-minute or 5-minute MACD crossovers that align with that larger trend.

Cap your holding time: Scalping is a hit-and-run operation. If the price hasn't moved in your favor within 3 to 5 bars of your entry, cut the trade. Do not wait for the MACD to cross back against you.

Beware the chop: During low-volume, ranging markets, fast MACD settings will chop you to pieces with false signals. Only deploy these fast settings during periods of high liquidity, like the market open or major session overlaps.

What settings are you all using for your morning scalps? Anyone running something faster than a 5-length fast EMA?

Re: Stop Using Default MACD for Scalping! (My Custom Settings for 1m & 5m Charts)

Posted: Fri Nov 06, 2026 7:09 pm
by PTScalper
Here is an MQL5 Expert Advisor (EA) built around those custom MACD scalping settings.

By default, the inputs are set to the "Speed Demon" (5-35-5) parameters, but I have exposed them as input variables so you can easily swap to the 8-17-9 or 5-13-5 settings directly from the MetaTrader 5 properties window.

MACD Scalper EA (MQL5)

Code: Select all

//+------------------------------------------------------------------+
//|                                            MACD_Fast_Scalper.mq5 |
//|                                                                  |
//+------------------------------------------------------------------+
#property copyright "Gemini AI"
#property link      ""
#property version   "1.00"

#include <Trade\Trade.mqh>

//--- Input parameters
input string   Strategy_Name  = "MACD Fast Scalper"; 
input int      FastEMA        = 5;     // MACD Fast EMA (Default: 5)
input int      SlowEMA        = 35;    // MACD Slow EMA (Default: 35)
input int      SignalSMA      = 5;     // MACD Signal SMA (Default: 5)
input double   LotSize        = 0.1;   // Trade Volume (Lots)
input int      StopLoss       = 50;    // Stop Loss (Points)
input int      TakeProfit     = 100;   // Take Profit (Points)

//--- Global Variables
int            macd_handle;
double         macd_main[];
double         macd_signal[];
CTrade         trade;

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
   // Initialize MACD indicator handle
   macd_handle = iMACD(_Symbol, _Period, FastEMA, SlowEMA, SignalSMA, PRICE_CLOSE);
   
   if(macd_handle == INVALID_HANDLE)
     {
      Print("Failed to create MACD indicator handle!");
      return(INIT_FAILED);
     }
     
   // Set arrays as series (index 0 is the most recent candle)
   ArraySetAsSeries(macd_main, true);
   ArraySetAsSeries(macd_signal, true);
   
   return(INIT_SUCCEEDED);
  }

//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
   IndicatorRelease(macd_handle);
  }

//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
   // 1. Check if we already have an open position (one trade at a time)
   if(PositionsTotal() > 0) return; 

   // 2. Update MACD buffers (copy latest 3 bars)
   if(CopyBuffer(macd_handle, 0, 0, 3, macd_main) <= 0) return;
   if(CopyBuffer(macd_handle, 1, 0, 3, macd_signal) <= 0) return;

   // 3. Define the crossover on completed candles (Bar 1 and Bar 2)
   // We do not use Bar 0 because the candle is still forming and can repaint
   bool isBullishCross = (macd_main[1] > macd_signal[1]) && (macd_main[2] <= macd_signal[2]);
   bool isBearishCross = (macd_main[1] < macd_signal[1]) && (macd_main[2] >= macd_signal[2]);

   // 4. Execute Trades
   if(isBullishCross)
     {
      double ask = SymbolInfoDouble(_Symbol, SYMBOL_ASK);
      double sl = ask - (StopLoss * _Point);
      double tp = ask + (TakeProfit * _Point);
      
      trade.Buy(LotSize, _Symbol, ask, sl, tp, "MACD Scalp Buy");
     }
   else if(isBearishCross)
     {
      double bid = SymbolInfoDouble(_Symbol, SYMBOL_BID);
      double sl = bid + (StopLoss * _Point);
      double tp = bid - (TakeProfit * _Point);
      
      trade.Sell(LotSize, _Symbol, bid, sl, tp, "MACD Scalp Sell");
     }
  }
//+------------------------------------------------------------------+

Re: Stop Using Default MACD for Scalping! (My Custom Settings for 1m & 5m Charts)

Posted: Fri Nov 06, 2026 7:09 pm
by PTScalper
How to use this script in MetaTrader 5:

1.) Open MT5 and press F4 to launch the MetaEditor.

2.) Under the Navigator panel on the left, right-click on Experts -> New File.

3.) Choose Expert Advisor (template), name it MACD_Fast_Scalper, and click Finish.

4.) Delete the default code, paste the script above, and press F7 to compile.

5.) In MT5, drag the EA from your Navigator window onto a 1-minute or 5-minute chart.

6.) Make sure "Allow Algo Trading" is turned on in both the EA properties and at the top of the MT5 terminal.

Note: The script hardcodes trade conditions on completed bars (macd_main[1] and [2]) to avoid "repainting" false signals on the live tick. Always backtest this in the MT5 Strategy Tester before throwing live capital at it.

Re: Stop Using Default MACD for Scalping! (My Custom Settings for 1m & 5m Charts)

Posted: Fri Nov 06, 2026 7:10 pm
by PTScalper
Here is the cTrader equivalent of the MACD Scalper, written in C# (cAlgo).

In cTrader, it is best practice to evaluate completed candle data using the OnBar() method rather than OnTick(). This ensures your crossover logic executes exactly once per candle the moment it closes, drastically reducing CPU load and preventing "repainting" false signals mid-candle.

MACD Scalper cBot (C#)

Code: Select all

using System;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class MACDFastScalper : Robot
    {
        // --- MACD Parameters ---
        [Parameter("Fast EMA", DefaultValue = 5, Group = "MACD Settings")]
        public int FastEma { get; set; }

        [Parameter("Slow EMA", DefaultValue = 35, Group = "MACD Settings")]
        public int SlowEma { get; set; }

        [Parameter("Signal SMA", DefaultValue = 5, Group = "MACD Settings")]
        public int SignalSma { get; set; }

        // --- Risk & Trade Parameters ---
        // Note: 10,000 units is typically 0.1 Lots in standard Forex accounts
        [Parameter("Volume (Units)", DefaultValue = 10000, Group = "Trade Settings")]
        public double VolumeInUnits { get; set; }

        [Parameter("Stop Loss (Pips)", DefaultValue = 5, Group = "Trade Settings")]
        public double StopLossPips { get; set; }

        [Parameter("Take Profit (Pips)", DefaultValue = 10, Group = "Trade Settings")]
        public double TakeProfitPips { get; set; }

        private MacdCross _macd;

        protected override void OnStart()
        {
            // Initialize the built-in MACD Cross indicator
            // cTrader MacdCross signature requires (Source, Long Cycle, Short Cycle, Signal Periods)
            _macd = Indicators.MacdCross(Bars.ClosePrices, SlowEma, FastEma, SignalSma);
        }

        protected override void OnBar()
        {
            // Restrict to one open position at a time for this specific bot and symbol
            if (Positions.FindAll("MACD Scalper", SymbolName).Length > 0)
                return;

            // Last(1) is the candle that just closed. Last(2) is the candle before it.
            double macdLine1 = _macd.MACD.Last(1);
            double signalLine1 = _macd.Signal.Last(1);
            
            double macdLine2 = _macd.MACD.Last(2);
            double signalLine2 = _macd.Signal.Last(2);

            // Determine if a crossover occurred upon the candle close
            bool isBullishCross = macdLine1 > signalLine1 && macdLine2 <= signalLine2;
            bool isBearishCross = macdLine1 < signalLine1 && macdLine2 >= signalLine2;

            // Execute Trades
            if (isBullishCross)
            {
                ExecuteMarketOrder(TradeType.Buy, SymbolName, VolumeInUnits, "MACD Scalper", StopLossPips, TakeProfitPips);
            }
            else if (isBearishCross)
            {
                ExecuteMarketOrder(TradeType.Sell, SymbolName, VolumeInUnits, "MACD Scalper", StopLossPips, TakeProfitPips);
            }
        }
    }
}

Re: Stop Using Default MACD for Scalping! (My Custom Settings for 1m & 5m Charts)

Posted: Fri Nov 06, 2026 7:10 pm
by PTScalper
Installation and Usage in cTrader

1.) Open the cTrader Automate tab (the robot icon on the left sidebar).

2.) Click the New cBot button at the top, name it MACDFastScalper, and double-click it to open the code editor.

3.) Replace the default template with the code above and click the Build button (or press F6).

4.) Once built successfully, go back to your chart, click the cBots icon at the top, and add MACDFastScalper to your 1-minute or 5-minute chart.

You can adjust the MACD settings (e.g., swapping to the 8-17-9 parameters) and Pip targets directly in the cBot parameters panel before clicking the Play button to start it.

Re: Stop Using Default MACD for Scalping! (My Custom Settings for 1m & 5m Charts)

Posted: Fri Nov 06, 2026 7:11 pm
by PTScalper
Here is the TradingView Pine Script (v5) equivalent. Because TradingView handles visual plotting and backtesting natively, this is written as a strategy script. It will automatically place buy/sell arrows directly on your price chart and run a historical backtest based on your Stop Loss and Take Profit parameters.

MACD Scalper Strategy (Pine Script v5)

Code: Select all

//@version=5
strategy("MACD Fast Scalper", overlay=true, initial_capital=1000, default_qty_type=strategy.percent_of_equity, default_qty_value=10)

// --- Inputs ---
fastEmaLen = input.int(5, title="Fast EMA Length", group="MACD Settings")
slowEmaLen = input.int(35, title="Slow EMA Length", group="MACD Settings")
sigSmaLen  = input.int(5, title="Signal SMA Length", group="MACD Settings")

// In TradingView, loss and profit are calculated in ticks/points. 
slTicks    = input.int(50, title="Stop Loss (Ticks/Points)", group="Risk Management")
tpTicks    = input.int(100, title="Take Profit (Ticks/Points)", group="Risk Management")

// --- MACD Calculation ---
// Standard MACD uses an EMA for the signal line, but we use an SMA here to match the strict custom settings.
fastEma    = ta.ema(close, fastEmaLen)
slowEma    = ta.ema(close, slowEmaLen)
macdLine   = fastEma - slowEma
signalLine = ta.sma(macdLine, sigSmaLen)

// --- Crossover Logic ---
bullCross  = ta.crossover(macdLine, signalLine)
bearCross  = ta.crossunder(macdLine, signalLine)

// --- Trade Execution ---
if (bullCross)
    strategy.entry("Scalp Buy", strategy.long)

if (bearCross)
    strategy.entry("Scalp Sell", strategy.short)

// --- Trade Exits (SL & TP) ---
strategy.exit("Exit Buy", "Scalp Buy", loss=slTicks, profit=tpTicks)
strategy.exit("Exit Sell", "Scalp Sell", loss=slTicks, profit=tpTicks)

// --- Visual Chart Markers ---
plotshape(bullCross, title="Buy Signal", style=shape.triangleup, location=location.belowbar, color=color.new(color.green, 0), size=size.small)
plotshape(bearCross, title="Sell Signal", style=shape.triangledown, location=location.abovebar, color=color.new(color.red, 0), size=size.small)

Re: Stop Using Default MACD for Scalping! (My Custom Settings for 1m & 5m Charts)

Posted: Fri Nov 06, 2026 7:12 pm
by PTScalper
How to use this in TradingView:

1.) Open a 1-minute or 5-minute chart in TradingView.

2.) Click the Pine Editor tab at the very bottom of the screen.

3.) Delete any default code in the editor, paste the script above, and click Save.

4.) Click Add to chart.

To swap to the 8-17-9 or 5-13-5 settings, you do not need to edit the code. Just click the gear icon (Settings) next to "MACD Fast Scalper" in the top-left corner of your chart and change the inputs.

Re: Stop Using Default MACD for Scalping! (My Custom Settings for 1m & 5m Charts)

Posted: Wed Nov 11, 2026 11:00 pm
by gwhitlock64
cheers for the pine script walkthrough, that's handy actually. quick one though - anyone had the gear icon just not show up proper on mobile app? im trying to tweak the inputs on my phone between jobs and it just opens a blank panel half the time, proper annoying when youre trying to swap to the 8-17-9 settings on the go.

also does changing the signal line to SMA instead of EMA like in that script actually make a noticeable difference on 5 min charts or is that just splitting hairs tbh