Advertisement IC Markets

Your Plan Should Include an "If This, Then That" Contingency Section

Master exponential money management, position sizing calculators, strict daily stop-loss limits, and overcoming FOMO on micro-timeframes.
Fairman
Posts: 6757
Joined: Tue Jul 21, 2026 7:11 am
Location: Abuja

Your Plan Should Include an "If This, Then That" Contingency Section

Post by Fairman »

Beyond your core entry and exit rules, a genuinely complete trading plan includes explicit answers to a handful of specific "what if" scenarios — decided in advance, in writing, while you're calm and thinking clearly, not improvised in real time under emotional pressure.

Work through these specific questions and write down your actual answers: What happens the moment I hit my daily loss limit — do I close the platform entirely, or just stop taking new trades while managing existing ones? What happens after three consecutive losing trades in a row, even if I haven't hit my full daily limit yet — do I pause, reduce size, or continue as normal? What happens during a major scheduled news event — do I close all positions beforehand, avoid opening new ones, or trade through it with adjusted sizing?

The value of deciding these answers in advance is worth emphasizing directly: in the actual moment these scenarios arise, you are, almost by definition, not in your calmest, clearest state of mind. You've just taken losses, or you're facing an uncertain news event, and that's precisely when your judgment is least reliable.

Having a pre-written answer removes the need to make a good decision under pressure — you just need to follow the decision your calmer self already made. This is one of the simplest, highest-value additions you can make to an existing trading plan, and it's the section most traders skip entirely, right up until the exact scenario it would have covered happens to them.
It’s Fairman :geek:
Recommended broker for automated trading & scalping IC Markets
LondonScalper
Posts: 965
Joined: Sat Sep 05, 2026 7:54 am

Re: Your Plan Should Include an "If This, Then That" Contingency Section

Post by LondonScalper »

If-this-then-that contingencies are how plans survive contact with London.

Examples I keep pre-written: if spread > X → no entry; if soft stop hits → flat 30 min; if high-impact in 20 min → no new risk. The point is to decide before adrenaline.

What contingency do you still refuse to write down — and why?
PropScalpDesk
Posts: 521
Joined: Sat Sep 19, 2026 7:50 pm

Re: Your Plan Should Include an "If This, Then That" Contingency Section

Post by PropScalpDesk »

Contingencies written before the open

Agree. Plans that only describe entries are incomplete. The expensive decisions happen when the script breaks, usually in the first messy hour after cash open.

Before I allow orders on a Frankfurt morning I already have written answers for:
  • Hit daily soft stop → flatten, close platform, no “one more.”
  • Broker reject or partial fill → cancel remainder, log, do not chase with market spam.
  • Spread blows through filter mid-idea → stand down; the idea is invalid at that cost.
  • Surprise headline in my pair → flat first, interpret later.
  • Internet or VPS blip → phone-app flatten checklist, not heroics from memory.
If This / Then That removes negotiation when pulse rate is up. I decide once on Sunday; weekday-me only executes. That is not drama — it is how a full-time desk stays employed.

I keep the contingency list next to the risk sheet so it is not a separate forgotten document. If a scenario is not on the list, the default is flat and review — not improvisation. That default has saved more mornings than clever mid-trade invention ever did.

Which contingency do people improvise most often — and what would a one-line rule look like if you wrote it tonight?
PTScalper
Site Admin
Posts: 7643
Joined: Mon Jul 20, 2026 1:28 pm

Re: Your Plan Should Include an "If This, Then That" Contingency Section

Post by PTScalper »

Fairman wrote: Sat Aug 22, 2026 10:54 am Beyond your core entry and exit rules, a genuinely complete trading plan includes explicit answers to a handful of specific "what if" scenarios — decided in advance, in writing, while you're calm and thinking clearly, not improvised in real time under emotional pressure.

Work through these specific questions and write down your actual answers: What happens the moment I hit my daily loss limit — do I close the platform entirely, or just stop taking new trades while managing existing ones? What happens after three consecutive losing trades in a row, even if I haven't hit my full daily limit yet — do I pause, reduce size, or continue as normal? What happens during a major scheduled news event — do I close all positions beforehand, avoid opening new ones, or trade through it with adjusted sizing?

The value of deciding these answers in advance is worth emphasizing directly: in the actual moment these scenarios arise, you are, almost by definition, not in your calmest, clearest state of mind. You've just taken losses, or you're facing an uncertain news event, and that's precisely when your judgment is least reliable.

Having a pre-written answer removes the need to make a good decision under pressure — you just need to follow the decision your calmer self already made. This is one of the simplest, highest-value additions you can make to an existing trading plan, and it's the section most traders skip entirely, right up until the exact scenario it would have covered happens to them.
Hi Fairman,

You are entirely right. The gap between a theoretical strategy and a surviving trading account is usually dictated by how one handles these exact pressure-cooker moments. When emotions spike, cognitive function drops; you cannot rely on your stressed mind to protect your capital.

To honor the exercise, here are concrete, written protocols for those three specific scenarios. These are designed as absolute rules, removing all ambiguity and eliminating the need for in-the-moment decision-making.

1. Hitting the Daily Loss Limit
The Rule: A hard, immediate stop.

Action: The moment the daily loss limit is breached, any remaining open intraday positions are immediately closed at market price. All pending limit and stop orders are canceled.

Platform: The trading terminal is closed for the remainder of the session.

Why this works: The temptation to "just manage" existing open trades after hitting a limit is a trap. It almost always devolves into moving stop-losses or holding onto hope to get back under the daily limit. Closing the platform physically breaks the cycle of revenge trading.
Preserve your own money. Scale with the market's money. Exponential growth is the ultimate key.
PTScalper
Site Admin
Posts: 7643
Joined: Mon Jul 20, 2026 1:28 pm

Re: Your Plan Should Include an "If This, Then That" Contingency Section

Post by PTScalper »

2. Three Consecutive Losing Trades

The Rule: Mandatory physical break and size reduction.

Action: After a third consecutive loss (even if the daily loss limit has not been reached), I must physically step away from the screens for a minimum of 60 minutes.

Adjustment: Upon returning, if my system presents another valid setup, the position size (risk) is reduced by 50% for the next trade. Full position sizing is only restored after a winning trade.

Why this works: Three consecutive losses usually indicate one of two things: the current market conditions are out of sync with the strategy, or the trader's read on the market is compromised. The time-out resets emotional tilt, while the reduced size acts as a low-cost "probe" to see if alignment with the market has returned.
Preserve your own money. Scale with the market's money. Exponential growth is the ultimate key.
PTScalper
Site Admin
Posts: 7643
Joined: Mon Jul 20, 2026 1:28 pm

Re: Your Plan Should Include an "If This, Then That" Contingency Section

Post by PTScalper »

3. Major Scheduled News Events (e.g., CPI, FOMC, NFP)

The Rule: Total exposure blackout.

Action: Exactly 15 minutes prior to a Tier-1 scheduled news release, all open intraday positions must be closed. All pending orders are canceled.

Re-entry: No new positions may be opened until at least 15 minutes after the data release, and only after the initial volatility has established a clear direction.

Why this works: Trading directly into major news is not executing a technical edge; it is gambling against unpredictable algorithmic spikes, extreme spread widening, and severe slippage. By stepping aside, you protect your capital from random, uncontrollable volatility.

By writing these out, the job of the trader during a live session shifts from making decisions to simply following instructions. The "calm self" has already done the heavy lifting; the "stressed self" just needs to obey.
Preserve your own money. Scale with the market's money. Exponential growth is the ultimate key.
PTScalper
Site Admin
Posts: 7643
Joined: Mon Jul 20, 2026 1:28 pm

Re: Your Plan Should Include an "If This, Then That" Contingency Section

Post by PTScalper »

Here is how you can translate those exact three risk management rules into automated logic using Pine Script v5 (TradingView’s programming language).

This script demonstrates how to hard-code your discipline. It uses a basic Moving Average crossover for entry signals, but the focus is entirely on how the script intercepts and blocks those signals based on your pre-written rules.

Code: Select all

//@version=5
strategy("Complete Risk Management Plan", overlay=true, initial_capital=10000)

// =========================================================================
// SCENARIO 1: The Daily Loss Limit
// =========================================================================
// Pine Script has a brilliant built-in function for this. 
// If your daily loss hits $500, it automatically closes all open positions 
// and completely halts trading until the next daily session begins.
strategy.risk.max_intraday_loss(500, strategy.cash)


// =========================================================================
// SCENARIO 2: Three Consecutive Losses (Timeout & Size Reduction)
// =========================================================================
var int consecutiveLosses = 0
var int timeoutEndTime = 0

// Detect the moment a trade is closed
tradeClosed = strategy.closedtrades > nz(strategy.closedtrades[1])

if tradeClosed
    // Check if the last closed trade (index is total trades - 1) was a loss
    if strategy.closedtrades.profit(strategy.closedtrades - 1) < 0
        consecutiveLosses += 1
    else
        // Reset the counter if it was a winning trade
        consecutiveLosses := 0

// If we hit exactly 3 losses, trigger a 60-minute timeout
if consecutiveLosses == 3 and tradeClosed
    timeoutEndTime := time + (60 * 60 * 1000) // 60 minutes added to current time

// Determine if we are currently in a timeout
isTimeoutActive = time < timeoutEndTime

// Adjust position sizing: cut size by 50% if we have 3 or more consecutive losses
baseQty = 2.0 // Standard position size (e.g., 2 contracts)
tradeQty = consecutiveLosses >= 3 ? (baseQty / 2) : baseQty


// =========================================================================
// SCENARIO 3: Scheduled News Events
// =========================================================================
// Define a blackout window. For example, if FOMC is at 14:00 EST, 
// we block trading from 13:45 to 14:15 EST.
// The time() function returns 'na' (not applicable) if outside this window.
inNewsBlackout = not na(time(timeframe.period, "1345-1415", "America/New_York"))


// =========================================================================
// ENTRY & EXIT EXECUTION
// =========================================================================
// Dummy strategy: Simple Moving Average Crossover
fastMA = ta.sma(close, 10)
slowMA = ta.sma(close, 20)
goLong = ta.crossover(fastMA, slowMA)
goShort = ta.crossunder(fastMA, slowMA)

// THE GATEKEEPER: Only allow trades if NO timeout is active AND NO news is pending
canTrade = not isTimeoutActive and not inNewsBlackout

// Execute Entries
if goLong and canTrade
    strategy.entry("Long", strategy.long, qty=tradeQty)

if goShort and canTrade
    strategy.entry("Short", strategy.short, qty=tradeQty)

// Execute Emergency Exits: Close positions instantly if we enter a news window
if inNewsBlackout and strategy.position_size != 0
    strategy.close_all(comment="News Blackout - Flattening")


// =========================================================================
// VISUALIZATION (So you can see your discipline on the chart)
// =========================================================================
// Paints the background Red during news blackouts
bgcolor(inNewsBlackout ? color.new(color.red, 80) : na, title="News Blackout")

// Paints the background Orange when your 60-minute penalty box is active
bgcolor(isTimeoutActive ? color.new(color.orange, 80) : na, title="Timeout Active")
Preserve your own money. Scale with the market's money. Exponential growth is the ultimate key.
PTScalper
Site Admin
Posts: 7643
Joined: Mon Jul 20, 2026 1:28 pm

Re: Your Plan Should Include an "If This, Then That" Contingency Section

Post by PTScalper »

How this enforces the rules:

strategy.risk.max_intraday_loss(): This single line is a lifesaver. If your floating or realized losses on a given day drop below the set amount ($500 in this example), TradingView’s engine will flat-out refuse to fire any more entry orders and will immediately issue market orders to close whatever is currently open.

The "Penalty Box" Logic: By tracking strategy.closedtrades.profit, the script knows exactly when you are on a losing streak. The timeoutEndTime variable acts as a digital pair of handcuffs, freezing new orders until an hour has passed. Because tradeQty is tied to a ternary operator (consecutiveLosses >= 3 ? ...), your size is automatically halved when you are permitted to trade again.

The "Flattening" Logic: The strategy.close_all command combined with the inNewsBlackout window ensures that even if you opened a beautiful trade at 13:15, the script will mercilessly close it at 13:45 to protect you from the 14:00 news spike.

By coding your plan this way—whether you fully automate your trading or just use the script to trigger alerts on your chart—you remove the human element of "in-the-moment" negotiation entirely.
Preserve your own money. Scale with the market's money. Exponential growth is the ultimate key.
PTScalper
Site Admin
Posts: 7643
Joined: Mon Jul 20, 2026 1:28 pm

Re: Your Plan Should Include an "If This, Then That" Contingency Section

Post by PTScalper »

Unlike TradingView’s Pine Script, which runs smoothly over a chart's history, MetaTrader requires you to write logic in C++ style (MQL4/MQL5) using an Expert Advisor (EA).

Because MT4 and MT5 handle order history differently (MT4 uses an "Orders" pool, whereas MT5 separates "Positions", "Orders", and "Deals"), you need specific functions for each platform.

Here is how you hard-code the exact same three rules—Daily Loss Limits, Consecutive Loss Timeouts, and Scheduled News Blackouts—into the OnTick() function of both MT4 and MT5.
Preserve your own money. Scale with the market's money. Exponential growth is the ultimate key.
PTScalper
Site Admin
Posts: 7643
Joined: Mon Jul 20, 2026 1:28 pm

Re: Your Plan Should Include an "If This, Then That" Contingency Section

Post by PTScalper »

1. The MT4 Implementation (MQL4)

In MT4, we iterate backward through OrdersHistoryTotal() to calculate the daily profit and consecutive loss streaks.

Code: Select all

//+------------------------------------------------------------------+
//|                                              RiskManager_MT4.mq4 |
//+------------------------------------------------------------------+
#property strict

input double DailyLossLimit  = 500.0;
input double BaseLotSize     = 0.1;
// FOMC News Window Example (Broker Server Time)
input int    NewsHourStart   = 13;
input int    NewsMinuteStart = 45;
input int    NewsHourEnd     = 14;
input int    NewsMinuteEnd   = 15;

datetime timeoutEndTime = 0;

void OnTick()
{
    // SCENARIO 1: Daily Loss Limit
    if(IsDailyLossReached())
    {
        CloseAllPositions();
        return; // Engine stops processing new trades for the day
    }

    // SCENARIO 3: News Blackout
    if(IsNewsBlackout())
    {
        CloseAllPositions();
        return; // Engine halts all execution during the news window
    }

    // SCENARIO 2: Penalty Box (Three Consecutive Losses)
    if(TimeCurrent() < timeoutEndTime) return; // In 60-min timeout, do nothing
    
    CheckConsecutiveLosses(); 

    // Cut lot size by 50% if currently on a losing streak of 3 or more
    double currentLotSize = BaseLotSize;
    if(GetConsecutiveLosses() >= 3) currentLotSize = BaseLotSize / 2.0;
    
    // --- YOUR STRATEGY LOGIC GOES HERE ---
    // Example: if(BuySignal) OrderSend(Symbol(), OP_BUY, currentLotSize, Ask, ...);
}

// =====================================================================
// HELPER FUNCTIONS
// =====================================================================

bool IsDailyLossReached()
{
    double todayRealized = 0.0;
    datetime startOfDay = iTime(Symbol(), PERIOD_D1, 0); // Midnight today
    
    for(int i = OrdersHistoryTotal() - 1; i >= 0; i--)
    {
        if(OrderSelect(i, SELECT_BY_POS, MODE_HISTORY) && OrderCloseTime() >= startOfDay)
        {
            todayRealized += OrderProfit() + OrderSwap() + OrderCommission();
        }
    }
    
    double floatingProfit = AccountEquity() - AccountBalance();
    return ((todayRealized + floatingProfit) <= -DailyLossLimit);
}

bool IsNewsBlackout()
{
    int currentMinutes = TimeHour(TimeCurrent()) * 60 + TimeMinute(TimeCurrent());
    int startMinutes   = NewsHourStart * 60 + NewsMinuteStart;
    int endMinutes     = NewsHourEnd * 60 + NewsMinuteEnd;
    
    return (currentMinutes >= startMinutes && currentMinutes <= endMinutes);
}

int GetConsecutiveLosses()
{
    int lossCount = 0;
    for(int i = OrdersHistoryTotal() - 1; i >= 0; i--)
    {
        if(OrderSelect(i, SELECT_BY_POS, MODE_HISTORY))
        {
            double pnl = OrderProfit() + OrderSwap() + OrderCommission();
            if(pnl < 0) lossCount++;
            else if(pnl > 0) break; // Streak broken by a win
        }
    }
    return lossCount;
}

void CheckConsecutiveLosses()
{
    static int lastHistoryCount = 0;
    int currentHistoryCount = OrdersHistoryTotal();
    
    // Only check at the exact moment a new trade is closed
    if(currentHistoryCount > lastHistoryCount)
    {
        if(GetConsecutiveLosses() >= 3) timeoutEndTime = TimeCurrent() + 3600; // 60 mins
        lastHistoryCount = currentHistoryCount;
    }
}

void CloseAllPositions()
{
    for(int i = OrdersTotal() - 1; i >= 0; i--)
    {
        if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
        {
            if(OrderType() == OP_BUY) OrderClose(OrderTicket(), OrderLots(), Bid, 3, clrRed);
            if(OrderType() == OP_SELL) OrderClose(OrderTicket(), OrderLots(), Ask, 3, clrRed);
        }
    }
}
Preserve your own money. Scale with the market's money. Exponential growth is the ultimate key.
Post Reply