Advertisement IC Markets

1 minute price action scalping strategy without indicators

Discuss 1-minute to 15-minute price action setups, fading intraday momentum, key support/resistance zones, and proven short-term trading methodologies.
FTtrader
Posts: 954
Joined: Mon Aug 03, 2026 2:43 pm

Re: 1 minute price action scalping strategy without indicators

Post by FTtrader »

Porting this to cAlgo unlocks significant advantages for market microstructure trading. Unlike TradingView, which relies on volume proxies, cTrader’s OnTick() event allows us to calculate intrabar order flow by tracking the aggressive lifting of the Ask or hitting of the Bid.

We can define true absorption as a divergence between effort (Tick Delta) and result (Candle Close). For example, if we sweep the Previous Day High and register a massive positive delta (aggressive buyers piling in), but the 1-minute candle closes bearish, those buyers were absorbed by institutional limit sell orders.
Recommended broker for automated trading & scalping IC Markets
FTtrader
Posts: 954
Joined: Mon Aug 03, 2026 2:43 pm

Re: 1 minute price action scalping strategy without indicators

Post by FTtrader »

Here is the C# cAlgo implementation. It tracks cumulative delta per bar and triggers the grid based on structural ATR invalidation.

Code: Select all

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

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class LiquiditySweepAbsorption : Robot
    {
        [Parameter("ADR Length", DefaultValue = 14, Group = "HTF Structure")]
        public int AdrLength { get; set; }

        [Parameter("ADR Exhaustion %", DefaultValue = 0.70, Group = "HTF Structure")]
        public double ExhaustionPct { get; set; }

        [Parameter("Min Tick Delta for Absorption", DefaultValue = 150, Group = "Microstructure", 
            Step = 10)]
        public double MinDeltaThreshold { get; set; }

        [Parameter("Scale-in Distance (ATR)", DefaultValue = 1.0, Group = "Risk & Grid")]
        public double ScaleInAtrMult { get; set; }

        [Parameter("Hard Stop (ATR)", DefaultValue = 2.5, Group = "Risk & Grid")]
        public double HardStopAtrMult { get; set; }

        [Parameter("Profit Target (ATR)", DefaultValue = 2.0, Group = "Risk & Grid")]
        public double ProfitTargetAtr { get; set; }

        [Parameter("Lot Size", DefaultValue = 0.1, Group = "Risk & Grid")]
        public double InitialLotSize { get; set; }

        private Bars _dailyBars;
        private AverageTrueRange _atr1m;
        
        private double _cumulativeDelta = 0;
        private double _lastAsk;
        private double _lastBid;

        private double _gridTarget = double.NaN;
        private double _gridStop = double.NaN;

        protected override void OnStart()
        {
            _dailyBars = MarketData.GetBars(TimeFrame.Daily);
            _atr1m = Indicators.AverageTrueRange(MarketSeries, 14, MovingAverageType.Simple);
            
            _lastAsk = Symbol.Ask;
            _lastBid = Symbol.Bid;
        }

        protected override void OnTick()
        {
            // Calculate pseudo footprint delta by analyzing tick direction
            if (Symbol.Ask > _lastAsk)
                _cumulativeDelta++; // Aggressive Buy up-tick
            else if (Symbol.Bid < _lastBid)
                _cumulativeDelta--; // Aggressive Sell down-tick
            
            _lastAsk = Symbol.Ask;
            _lastBid = Symbol.Bid;

            ManageGridExits();
        }

        protected override void OnBar()
        {
            var positions = Positions.FindAll("SweepBot", Symbol.Name);
            double currentAtr = _atr1m.Result.Last(1);

            // 1. Calculate Higher Timeframe Structure
            double pdh = _dailyBars.HighPrices.Last(1);
            double pdl = _dailyBars.LowPrices.Last(1);
            
            double sumRange = 0;
            for (int i = 1; i <= AdrLength; i++)
                sumRange += _dailyBars.HighPrices.Last(i) - _dailyBars.LowPrices.Last(i);
            
            double adr = sumRange / AdrLength;
            double dailyOpen = _dailyBars.OpenPrices.Last(0);
            
            double upperExhaustion = dailyOpen + (adr * ExhaustionPct);
            double lowerExhaustion = dailyOpen - (adr * ExhaustionPct);

            // 2. Microstructure Absorption Evaluation
            bool inPremiumZone = MarketSeries.High.Last(1) >= upperExhaustion || MarketSeries.High.Last(1) >= pdh;
            bool inDiscountZone = MarketSeries.Low.Last(1) <= lowerExhaustion || MarketSeries.Low.Last(1) <= pdl;

            bool isBearishClose = MarketSeries.Close.Last(1) < MarketSeries.Open.Last(1);
            bool isBullishClose = MarketSeries.Close.Last(1) > MarketSeries.Open.Last(1);

            // Trap: Massive positive delta (buyers) but closed bearish
            bool bearishAbsorption = inPremiumZone && (_cumulativeDelta > MinDeltaThreshold) && isBearishClose;
            
            // Trap: Massive negative delta (sellers) but closed bullish
            bool bullishAbsorption = inDiscountZone && (_cumulativeDelta < -MinDeltaThreshold) && isBullishClose;

            // 3. Execution & Grid Logic
            if (positions.Length == 0)
            {
                if (bullishAbsorption)
                {
                    ExecuteMarketOrder(TradeType.Buy, Symbol.Name, Symbol.QuantityToVolumeInUnits(InitialLotSize), "SweepBot");
                    _gridTarget = Symbol.Ask + (currentAtr * ProfitTargetAtr);
                    _gridStop = Symbol.Ask - (currentAtr * HardStopAtrMult);
                }
                else if (bearishAbsorption)
                {
                    ExecuteMarketOrder(TradeType.Sell, Symbol.Name, Symbol.QuantityToVolumeInUnits(InitialLotSize), "SweepBot");
                    _gridTarget = Symbol.Bid - (currentAtr * ProfitTargetAtr);
                    _gridStop = Symbol.Bid + (currentAtr * HardStopAtrMult);
                }
            }
            else if (positions.Length > 0 && positions.Length < 3) // Max 3 pyramid entries
            {
                var lastPos = positions.OrderByDescending(p => p.EntryTime).First();
                
                if (lastPos.TradeType == TradeType.Buy && Symbol.Ask < lastPos.EntryPrice - (currentAtr * ScaleInAtrMult))
                {
                    ExecuteMarketOrder(TradeType.Buy, Symbol.Name, Symbol.QuantityToVolumeInUnits(InitialLotSize), "SweepBot");
                }
                else if (lastPos.TradeType == TradeType.Sell && Symbol.Bid > lastPos.EntryPrice + (currentAtr * ScaleInAtrMult))
                {
                    ExecuteMarketOrder(TradeType.Sell, Symbol.Name, Symbol.QuantityToVolumeInUnits(InitialLotSize), "SweepBot");
                }
            }

            // Reset intrabar delta for the new candle
            _cumulativeDelta = 0;
        }

        private void ManageGridExits()
        {
            var positions = Positions.FindAll("SweepBot", Symbol.Name);
            if (positions.Length == 0 || double.IsNaN(_gridTarget) || double.IsNaN(_gridStop)) 
                return;

            bool closeGrid = false;
            var direction = positions[0].TradeType;

            if (direction == TradeType.Buy)
            {
                if (Symbol.Bid >= _gridTarget || Symbol.Bid <= _gridStop) closeGrid = true;
            }
            else
            {
                if (Symbol.Ask <= _gridTarget || Symbol.Ask >= _gridStop) closeGrid = true;
            }

            if (closeGrid)
            {
                foreach (var pos in positions)
                {
                    ClosePosition(pos);
                }
                _gridTarget = double.NaN;
                _gridStop = double.NaN;
            }
        }
    }
}
FTtrader
Posts: 954
Joined: Mon Aug 03, 2026 2:43 pm

Re: 1 minute price action scalping strategy without indicators

Post by FTtrader »

Key Architectural Differences

Intrabar Delta Tracking (OnTick): The bot actively evaluates order book pressure by incrementing/decrementing _cumulativeDelta based on how the Ask and Bid are lifted or hit. This replaces the Pine Script moving average proxy with raw flow.

Asynchronous Grid Exits (ManageGridExits): Standard ModifyPosition hard-stops can get messy when scaling in at different prices. By managing _gridTarget and _gridStop in memory and polling them directly inside OnTick(), the bot ensures the entire pyramid is liquidated instantly the millisecond your structural invalidation point is breached.

Daily Series Injection (MarketData.GetBars): Instead of using security calls that can repaint or lag on lower timeframes, we pull the strict TimeFrame.Daily bars natively and loop through them in OnBar() to build the dynamic ADR killzones dynamically.
FTtrader
Posts: 954
Joined: Mon Aug 03, 2026 2:43 pm

Re: 1 minute price action scalping strategy without indicators

Post by FTtrader »

Porting this microstructure logic to MetaTrader requires a fundamental architectural shift. Unlike cTrader or Sierra Chart, MT4 and MT5 do not natively store historical bid/ask delta for footprint analysis.

To solve this, both Expert Advisors below track order flow dynamically inside the OnTick() function. They build a cumulative tick delta live by evaluating every single price update, and then trigger the execution logic the exact millisecond the 1-minute candle closes.

Critical Execution Note: For the MQL5 version to execute the cost-averaging grid properly, you must use an MT5 Hedging account. Netting accounts will blend multiple entries into a single position, breaking the structural exit logic. When backtesting in MT5, you must select "Every tick based on real ticks"; otherwise, the tick delta will be flat.
FTtrader
Posts: 954
Joined: Mon Aug 03, 2026 2:43 pm

Re: 1 minute price action scalping strategy without indicators

Post by FTtrader »

MQL4: Liquidity Sweep & Absorption EA

Code: Select all

//+------------------------------------------------------------------+
//|                                        SweepAbsorption_MQL4.mq4  |
//|                 Institutional Liquidity Sweep & Absorption Grid  |
//+------------------------------------------------------------------+
#property strict

input int    ADR_Length          = 14;     // ADR Period (Daily)
input double ExhaustionPct       = 0.70;   // ADR Exhaustion % (0.70 = 70%)
input int    MinDeltaThreshold   = 150;    // Min Tick Delta for Absorption
input double ScaleInAtrMult      = 1.0;    // Scale-in Distance (ATR)
input double HardStopAtrMult     = 2.5;    // Hard Stop (ATR)
input double ProfitTargetAtr     = 2.0;    // Target (ATR)
input double LotSize             = 0.1;    // Initial Lot Size
input int    MagicNumber         = 77777;

int delta_cumulative = 0;
double last_ask, last_bid;
datetime last_bar_time;

double grid_target = 0, grid_stop = 0;

int OnInit() {
    last_ask = Ask; 
    last_bid = Bid;
    return(INIT_SUCCEEDED);
}

void OnTick() {
    // 1. Live Order Flow Tracking (Tick Delta)
    if(Ask > last_ask) delta_cumulative++;
    else if(Bid < last_bid) delta_cumulative--;
    
    last_ask = Ask; 
    last_bid = Bid;
    
    // Manage Grid Exits Asynchronously 
    ManageGridExits();
    
    // 2. Bar Close Logic (Microstructure Evaluation)
    if(Time[0] != last_bar_time) {
        if(last_bar_time != 0) {
            OnBarClose();
        }
        last_bar_time = Time[0];
        delta_cumulative = 0; // Reset footprint for the new 1m candle
    }
}

void OnBarClose() {
    double atr = iATR(Symbol(), 0, 14, 1);
    
    // Calculate HTF Structure
    double pdh = iHigh(Symbol(), PERIOD_D1, 1);
    double pdl = iLow(Symbol(), PERIOD_D1, 1);
    
    double sum_range = 0;
    for(int i=1; i<=ADR_Length; i++) {
        sum_range += (iHigh(Symbol(), PERIOD_D1, i) - iLow(Symbol(), PERIOD_D1, i));
    }
    double adr = sum_range / ADR_Length;
    double daily_open = iOpen(Symbol(), PERIOD_D1, 0);
    
    double upperExhaustion = daily_open + (adr * ExhaustionPct);
    double lowerExhaustion = daily_open - (adr * ExhaustionPct);
    
    // Determine Structural Placement
    bool inPremiumZone = (High[1] >= upperExhaustion || High[1] >= pdh);
    bool inDiscountZone = (Low[1] <= lowerExhaustion || Low[1] <= pdl);
    
    bool isBearishClose = (Close[1] < Open[1]);
    bool isBullishClose = (Close[1] > Open[1]);
    
    // Absorption Triggers (Massive Effort vs Failing Result)
    bool bearishAbsorption = inPremiumZone && (delta_cumulative > MinDeltaThreshold) && isBearishClose;
    bool bullishAbsorption = inDiscountZone && (delta_cumulative < -MinDeltaThreshold) && isBullishClose;
    
    // Tally Open Positions & Find Last Entry
    int total_buys = 0, total_sells = 0;
    double last_buy_price = 0, last_sell_price = 0;
    datetime last_buy_time = 0, last_sell_time = 0;
    
    for(int i = 0; i < OrdersTotal(); i++) {
        if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES) && OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber) {
            if(OrderType() == OP_BUY) {
                total_buys++;
                if(OrderOpenTime() > last_buy_time) {
                    last_buy_time = OrderOpenTime();
                    last_buy_price = OrderOpenPrice();
                }
            } else if(OrderType() == OP_SELL) {
                total_sells++;
                if(OrderOpenTime() > last_sell_time) {
                    last_sell_time = OrderOpenTime();
                    last_sell_price = OrderOpenPrice();
                }
            }
        }
    }
    
    // Execution Logic
    if(total_buys == 0 && total_sells == 0) {
        if(bullishAbsorption) {
            int ticket = OrderSend(Symbol(), OP_BUY, LotSize, Ask, 3, 0, 0, "SweepBot", MagicNumber, 0, clrGreen);
            if(ticket > 0) {
                grid_target = Ask + (atr * ProfitTargetAtr);
                grid_stop = Ask - (atr * HardStopAtrMult);
            }
        }
        else if(bearishAbsorption) {
            int ticket = OrderSend(Symbol(), OP_SELL, LotSize, Bid, 3, 0, 0, "SweepBot", MagicNumber, 0, clrRed);
            if(ticket > 0) {
                grid_target = Bid - (atr * ProfitTargetAtr);
                grid_stop = Bid + (atr * HardStopAtrMult);
            }
        }
    } 
    // DCA Scale-In Logic (Max 3 Pyramid Entries)
    else if(total_buys > 0 && total_buys < 3) {
        if(Ask < last_buy_price - (atr * ScaleInAtrMult)) {
            OrderSend(Symbol(), OP_BUY, LotSize, Ask, 3, 0, 0, "SweepBot", MagicNumber, 0, clrGreen);
        }
    } 
    else if(total_sells > 0 && total_sells < 3) {
        if(Bid > last_sell_price + (atr * ScaleInAtrMult)) {
            OrderSend(Symbol(), OP_SELL, LotSize, Bid, 3, 0, 0, "SweepBot", MagicNumber, 0, clrRed);
        }
    }
}

void ManageGridExits() {
    if(grid_target == 0 || grid_stop == 0) return;
    
    bool close_all = false;
    for(int i = 0; i < OrdersTotal(); i++) {
        if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES) && OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber) {
            if(OrderType() == OP_BUY) {
                if(Bid >= grid_target || Bid <= grid_stop) close_all = true;
            } else if(OrderType() == OP_SELL) {
                if(Ask <= grid_target || Ask >= grid_stop) close_all = true;
            }
            break;
        }
    }
    
    if(close_all) {
        for(int i = OrdersTotal()-1; i >= 0; i--) {
            if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES) && OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber) {
                if(OrderType() == OP_BUY) OrderClose(OrderTicket(), OrderLots(), Bid, 3);
                if(OrderType() == OP_SELL) OrderClose(OrderTicket(), OrderLots(), Ask, 3);
            }
        }
        grid_target = 0;
        grid_stop = 0;
    }
}
FTtrader
Posts: 954
Joined: Mon Aug 03, 2026 2:43 pm

Re: 1 minute price action scalping strategy without indicators

Post by FTtrader »

MQL5: Liquidity Sweep & Absorption EA

Code: Select all

//+------------------------------------------------------------------+
//|                                        SweepAbsorption_MQL5.mq5  |
//|                 Institutional Liquidity Sweep & Absorption Grid  |
//+------------------------------------------------------------------+
#property strict
#include <Trade\Trade.mqh>

input int    ADR_Length          = 14;     
input double ExhaustionPct       = 0.70;   
input int    MinDeltaThreshold   = 150;    
input double ScaleInAtrMult      = 1.0;    
input double HardStopAtrMult     = 2.5;    
input double ProfitTargetAtr     = 2.0;    
input double LotSize             = 0.1;    
input int    MagicNumber         = 77777;

CTrade trade;
int atr_handle;
int delta_cumulative = 0;
double last_ask, last_bid;
datetime last_bar_time;

double grid_target = 0, grid_stop = 0;

int OnInit() {
    trade.SetExpertMagicNumber(MagicNumber);
    atr_handle = iATR(_Symbol, PERIOD_CURRENT, 14);
    last_ask = SymbolInfoDouble(_Symbol, SYMBOL_ASK);
    last_bid = SymbolInfoDouble(_Symbol, SYMBOL_BID);
    return(INIT_SUCCEEDED);
}

void OnTick() {
    double ask = SymbolInfoDouble(_Symbol, SYMBOL_ASK);
    double bid = SymbolInfoDouble(_Symbol, SYMBOL_BID);
    
    if(ask > last_ask) delta_cumulative++;
    else if(bid < last_bid) delta_cumulative--;
    
    last_ask = ask; 
    last_bid = bid;
    
    ManageGridExits();
    
    datetime current_time = iTime(_Symbol, PERIOD_CURRENT, 0);
    if(current_time != last_bar_time) {
        if(last_bar_time != 0) {
            OnBarClose();
        }
        last_bar_time = current_time;
        delta_cumulative = 0; 
    }
}

void OnBarClose() {
    double atrArray[];
    ArraySetAsSeries(atrArray, true);
    CopyBuffer(atr_handle, 0, 1, 1, atrArray);
    double atr = atrArray[0];
    
    MqlRates dailyRates[];
    ArraySetAsSeries(dailyRates, true);
    CopyRates(_Symbol, PERIOD_D1, 0, ADR_Length + 1, dailyRates);
    
    double pdh = dailyRates[1].high;
    double pdl = dailyRates[1].low;
    double daily_open = dailyRates[0].open;
    
    double sum_range = 0;
    for(int i=1; i<=ADR_Length; i++) {
        sum_range += (dailyRates[i].high - dailyRates[i].low);
    }
    double adr = sum_range / ADR_Length;
    
    double upperExhaustion = daily_open + (adr * ExhaustionPct);
    double lowerExhaustion = daily_open - (adr * ExhaustionPct);
    
    MqlRates m1Rates[];
    ArraySetAsSeries(m1Rates, true);
    CopyRates(_Symbol, PERIOD_CURRENT, 1, 1, m1Rates);
    
    bool inPremiumZone = (m1Rates[0].high >= upperExhaustion || m1Rates[0].high >= pdh);
    bool inDiscountZone = (m1Rates[0].low <= lowerExhaustion || m1Rates[0].low <= pdl);
    
    bool isBearishClose = (m1Rates[0].close < m1Rates[0].open);
    bool isBullishClose = (m1Rates[0].close > m1Rates[0].open);
    
    bool bearishAbsorption = inPremiumZone && (delta_cumulative > MinDeltaThreshold) && isBearishClose;
    bool bullishAbsorption = inDiscountZone && (delta_cumulative < -MinDeltaThreshold) && isBullishClose;
    
    int total_buys = 0, total_sells = 0;
    double last_buy_price = 0, last_sell_price = 0;
    datetime last_buy_time = 0, last_sell_time = 0;
    
    for(int i = 0; i < PositionsTotal(); i++) {
        ulong ticket = PositionGetTicket(i);
        if(PositionGetString(POSITION_SYMBOL) == _Symbol && PositionGetInteger(POSITION_MAGIC) == MagicNumber) {
            long type = PositionGetInteger(POSITION_TYPE);
            double price = PositionGetDouble(POSITION_PRICE_OPEN);
            datetime time = (datetime)PositionGetInteger(POSITION_TIME);
            
            if(type == POSITION_TYPE_BUY) {
                total_buys++;
                if(time > last_buy_time) { last_buy_time = time; last_buy_price = price; }
            } else if(type == POSITION_TYPE_SELL) {
                total_sells++;
                if(time > last_sell_time) { last_sell_time = time; last_sell_price = price; }
            }
        }
    }
    
    double ask = SymbolInfoDouble(_Symbol, SYMBOL_ASK);
    double bid = SymbolInfoDouble(_Symbol, SYMBOL_BID);
    
    if(total_buys == 0 && total_sells == 0) {
        if(bullishAbsorption) {
            if(trade.Buy(LotSize, _Symbol, ask, 0, 0, "SweepBot")) {
                grid_target = ask + (atr * ProfitTargetAtr);
                grid_stop = ask - (atr * HardStopAtrMult);
            }
        }
        else if(bearishAbsorption) {
            if(trade.Sell(LotSize, _Symbol, bid, 0, 0, "SweepBot")) {
                grid_target = bid - (atr * ProfitTargetAtr);
                grid_stop = bid + (atr * HardStopAtrMult);
            }
        }
    } 
    else if(total_buys > 0 && total_buys < 3) {
        if(ask < last_buy_price - (atr * ScaleInAtrMult)) {
            trade.Buy(LotSize, _Symbol, ask, 0, 0, "SweepBot");
        }
    } 
    else if(total_sells > 0 && total_sells < 3) {
        if(bid > last_sell_price + (atr * ScaleInAtrMult)) {
            trade.Sell(LotSize, _Symbol, bid, 0, 0, "SweepBot");
        }
    }
}

void ManageGridExits() {
    if(grid_target == 0 || grid_stop == 0) return;
    
    bool close_all = false;
    for(int i = 0; i < PositionsTotal(); i++) {
        ulong ticket = PositionGetTicket(i);
        if(PositionGetString(POSITION_SYMBOL) == _Symbol && PositionGetInteger(POSITION_MAGIC) == MagicNumber) {
            long type = PositionGetInteger(POSITION_TYPE);
            double current_bid = SymbolInfoDouble(_Symbol, SYMBOL_BID);
            double current_ask = SymbolInfoDouble(_Symbol, SYMBOL_ASK);
            
            if(type == POSITION_TYPE_BUY) {
                if(current_bid >= grid_target || current_bid <= grid_stop) close_all = true;
            } else if(type == POSITION_TYPE_SELL) {
                if(current_ask <= grid_target || current_ask >= grid_stop) close_all = true;
            }
            break;
        }
    }
    
    if(close_all) {
        for(int i = PositionsTotal()-1; i >= 0; i--) {
            ulong ticket = PositionGetTicket(i);
            if(PositionGetString(POSITION_SYMBOL) == _Symbol && PositionGetInteger(POSITION_MAGIC) == MagicNumber) {
                trade.PositionClose(ticket);
            }
        }
        grid_target = 0;
        grid_stop = 0;
    }
}
FTtrader
Posts: 954
Joined: Mon Aug 03, 2026 2:43 pm

Re: 1 minute price action scalping strategy without indicators

Post by FTtrader »

To send push notifications to your mobile device, you need to use the native SendNotification() function.

Before the code will work, you must link your mobile app to your desktop terminal:

Open your MetaTrader mobile app, go to Settings > Messages and find your MetaQuotes ID (an 8-character code).

On your desktop MT4/MT5, go to Tools > Options > Notifications.

Check Enable Push Notifications, enter your MetaQuotes ID, and click Test to confirm it works.

Here is how to update the OnBarClose() function in both EAs to fire off a push notification the exact millisecond the absorption trap triggers.
FTtrader
Posts: 954
Joined: Mon Aug 03, 2026 2:43 pm

Re: 1 minute price action scalping strategy without indicators

Post by FTtrader »

MQL4 Update

Replace the Execution Logic block inside your OnBarClose() function with this updated version:

Code: Select all

// Execution Logic
    if(total_buys == 0 && total_sells == 0) {
        if(bullishAbsorption) {
            int ticket = OrderSend(Symbol(), OP_BUY, LotSize, Ask, 3, 0, 0, "SweepBot", MagicNumber, 0, clrGreen);
            if(ticket > 0) {
                grid_target = Ask + (atr * ProfitTargetAtr);
                grid_stop = Ask - (atr * HardStopAtrMult);
                SendNotification("🚨 SweepBot: Bullish Absorption Trap triggered on " + Symbol() + " at " + DoubleToStr(Ask, Digits));
            }
        }
        else if(bearishAbsorption) {
            int ticket = OrderSend(Symbol(), OP_SELL, LotSize, Bid, 3, 0, 0, "SweepBot", MagicNumber, 0, clrRed);
            if(ticket > 0) {
                grid_target = Bid - (atr * ProfitTargetAtr);
                grid_stop = Bid + (atr * HardStopAtrMult);
                SendNotification("🚨 SweepBot: Bearish Absorption Trap triggered on " + Symbol() + " at " + DoubleToStr(Bid, Digits));
            }
        }
    } 
    // DCA Scale-In Logic (Max 3 Pyramid Entries)
    else if(total_buys > 0 && total_buys < 3) {
        if(Ask < last_buy_price - (atr * ScaleInAtrMult)) {
            if(OrderSend(Symbol(), OP_BUY, LotSize, Ask, 3, 0, 0, "SweepBot", MagicNumber, 0, clrGreen) > 0) {
                SendNotification("🔄 SweepBot: Scaled into Long on " + Symbol() + " at " + DoubleToStr(Ask, Digits));
            }
        }
    } 
    else if(total_sells > 0 && total_sells < 3) {
        if(Bid > last_sell_price + (atr * ScaleInAtrMult)) {
            if(OrderSend(Symbol(), OP_SELL, LotSize, Bid, 3, 0, 0, "SweepBot", MagicNumber, 0, clrRed) > 0) {
                SendNotification("🔄 SweepBot: Scaled into Short on " + Symbol() + " at " + DoubleToStr(Bid, Digits));
            }
        }
    }
FTtrader
Posts: 954
Joined: Mon Aug 03, 2026 2:43 pm

Re: 1 minute price action scalping strategy without indicators

Post by FTtrader »

MQL5 Update

Replace the execution block inside the MQL5 OnBarClose() function with this updated version:

Code: Select all

if(total_buys == 0 && total_sells == 0) {
        if(bullishAbsorption) {
            if(trade.Buy(LotSize, _Symbol, ask, 0, 0, "SweepBot")) {
                grid_target = ask + (atr * ProfitTargetAtr);
                grid_stop = ask - (atr * HardStopAtrMult);
                SendNotification("🚨 SweepBot: Bullish Absorption Trap triggered on " + _Symbol + " at " + DoubleToString(ask, _Digits));
            }
        }
        else if(bearishAbsorption) {
            if(trade.Sell(LotSize, _Symbol, bid, 0, 0, "SweepBot")) {
                grid_target = bid - (atr * ProfitTargetAtr);
                grid_stop = bid + (atr * HardStopAtrMult);
                SendNotification("🚨 SweepBot: Bearish Absorption Trap triggered on " + _Symbol + " at " + DoubleToString(bid, _Digits));
            }
        }
    } 
    else if(total_buys > 0 && total_buys < 3) {
        if(ask < last_buy_price - (atr * ScaleInAtrMult)) {
            if(trade.Buy(LotSize, _Symbol, ask, 0, 0, "SweepBot")) {
                SendNotification("🔄 SweepBot: Scaled into Long on " + _Symbol + " at " + DoubleToString(ask, _Digits));
            }
        }
    } 
    else if(total_sells > 0 && total_sells < 3) {
        if(bid > last_sell_price + (atr * ScaleInAtrMult)) {
            if(trade.Sell(LotSize, _Symbol, bid, 0, 0, "SweepBot")) {
                SendNotification("🔄 SweepBot: Scaled into Short on " + _Symbol + " at " + DoubleToString(bid, _Digits));
            }
        }
    }
Post Reply