Page 1 of 1

Daily loss limit psychology: stopping before the auto-fail

Posted: Mon Sep 14, 2026 7:56 pm
by LondonScalper
Daily loss limits fail in the last twenty minutes before they trip -- that is the psychology problem.

The number on the sticky is easy at 07:00. At -0.8R with "one clean setup left," the brain bargains. I have blown past limits not because I forgot the rule, but because I redefined the trade as an exception.

What actually stops me earlier
1. Soft throttle before the hard stop (size down / A+ only)
2. Written definition of "day over" that includes process strikes, not only cash
3. Platform close or logout -- friction beats willpower

The auto-fail (prop or personal) should be a backstop, not the plan. If you are regularly kissing it, the limit is doing too much work and your soft brakes are missing.

I also write the limit in cash and in R so I cannot pretend a volatile gold ticket is "only a bit over." Same number, two units, no poetry.

How do you make the stop real before the account enforces it for you?

Re: Daily loss limit psychology: stopping before the auto-fail

Posted: Fri Sep 25, 2026 9:06 am
by FTtrader
LondonScalper wrote: Mon Sep 14, 2026 7:56 pm Daily loss limits fail in the last twenty minutes before they trip -- that is the psychology problem.

The number on the sticky is easy at 07:00. At -0.8R with "one clean setup left," the brain bargains. I have blown past limits not because I forgot the rule, but because I redefined the trade as an exception.

What actually stops me earlier
1. Soft throttle before the hard stop (size down / A+ only)
2. Written definition of "day over" that includes process strikes, not only cash
3. Platform close or logout -- friction beats willpower

The auto-fail (prop or personal) should be a backstop, not the plan. If you are regularly kissing it, the limit is doing too much work and your soft brakes are missing.

I also write the limit in cash and in R so I cannot pretend a volatile gold ticket is "only a bit over." Same number, two units, no poetry.

How do you make the stop real before the account enforces it for you?
Hi LondonScalper,

You are describing the exact cognitive trap that separates professional risk managers from gamblers: you cannot be both the player and the referee when you are down 0.8R. Under stress, the brain is an exceptional lawyer, infinitely capable of redefining a C- setup as an "A+ exception" just to get back to breakeven.

To make the stop real before the broker liquidates you, you have to build systems that rely on environmental friction, not willpower. Willpower is a depleting resource; by the time you are staring down a daily loss limit, your tank is empty.

Here is how you bridge the gap between the soft throttle and the hard stop:

The "Proof of Sanity" Checkpoint: When you hit the soft throttle, you are no longer allowed to just click the mouse. You must physically stand up, step away from the desk for 5 minutes, and fill out a physical index card justifying the next trade. If you cannot articulate the thesis in writing without using the words "make back," the trading day is over.

The Account-Level Referee (Algorithmic Friction): You offload the willpower to a machine. You run a background script that monitors your daily net PnL (realized + unrealized). When it hits the soft limit, it throws a visual and auditory alarm. When it hits the hard limit, it liquidates everything and—crucially—instantly closes any new manual trade you try to open out of frustration.

Here is a cTrader cBot specifically designed to act as that unfeeling referee. It implements your exact philosophy: a soft throttle warning and a hard backstop that prevents revenge trading.

Re: Daily loss limit psychology: stopping before the auto-fail

Posted: Fri Sep 25, 2026 9:07 am
by FTtrader
The "Daily Loss Guard" cTrader Script
This cBot runs in the background of your cTrader platform. It calculates your daily realized and unrealized PnL.

Soft Limit: Triggers an on-chart warning and plays an alert sound to signal your "size down / A+ only" phase.

Hard Limit: Flattens all open positions instantly.

Revenge Trade Lockout: If you try to manually force a trade after the hard limit is hit, the bot will instantly close it before you can blink.

Re: Daily loss limit psychology: stopping before the auto-fail

Posted: Fri Sep 25, 2026 9:07 am
by FTtrader

Code: Select all

Ctrader script version 1.0

Code: Select all

using System;
using System.Linq;
using cAlgo.API;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class DailyLossGuard : Robot
    {
        [Parameter("Soft Limit (Cash Amount)", DefaultValue = 80, MinValue = 0)]
        public double SoftLimit { get; set; }

        [Parameter("Hard Limit (Cash Amount)", DefaultValue = 100, MinValue = 0)]
        public double HardLimit { get; set; }

        private bool _hardLimitReached = false;
        private bool _softLimitReached = false;
        private DateTime _currentDay;

        protected override void OnStart()
        {
            _currentDay = Server.Time.Date;
            // Check PnL every 1 second to ensure we catch drawdown spikes
            Timer.Start(1); 
            UpdateChartText("Status: Guard Active", Color.SeaGreen);
        }

        protected override void OnTimer()
        {
            // Reset the limits when a new trading day begins
            if (Server.Time.Date != _currentDay)
            {
                _currentDay = Server.Time.Date;
                _hardLimitReached = false;
                _softLimitReached = false;
                UpdateChartText("Status: Guard Active (New Day)", Color.SeaGreen);
            }

            // If we are locked out, do nothing else
            if (_hardLimitReached) return;

            double dailyPnL = GetDailyPnL();

            // Check hard limit first
            if (dailyPnL <= -HardLimit)
            {
                TriggerHardStop();
            }
            // Check soft limit
            else if (dailyPnL <= -SoftLimit && !_softLimitReached)
            {
                TriggerSoftStop();
            }
        }

        private double GetDailyPnL()
        {
            // Sum of all trades closed today
            double closedPnL = History.Where(x => x.ClosingTime.Date == _currentDay).Sum(x => x.NetProfit);
            // Sum of all currently open trades
            double openPnL = Positions.Sum(x => x.NetProfit);
            
            return closedPnL + openPnL;
        }

        private void TriggerSoftStop()
        {
            _softLimitReached = true;
            Notifications.PlaySound(SoundType.Warning);
            UpdateChartText("SOFT THROTTLE: Down -0.8R. Size down. A+ setups only.", Color.DarkOrange);
            Print("Soft loss limit reached. Switching to defensive mode.");
        }

        private void TriggerHardStop()
        {
            _hardLimitReached = true;
            UpdateChartText("HARD LIMIT HIT: Flattener engaged. Day Over.", Color.Red);
            
            // Flatten all open positions
            foreach (var position in Positions)
            {
                ClosePosition(position);
            }
            Print("Hard loss limit reached. All positions flattened.");
        }

        protected override void OnPositionOpened(Position position)
        {
            // The ultimate friction: If you try to revenge trade manually after 
            // the hard limit is hit, the bot immediately closes the ticket.
            if (_hardLimitReached)
            {
                Print("Revenge trade detected post-limit. Closing immediately.");
                ClosePosition(position);
            }
        }

        private void UpdateChartText(string message, Color color)
        {
            Chart.DrawText("GuardStatus", message, VerticalAlignment.Top, HorizontalAlignment.Left, color);
        }
    }
}

Re: Daily loss limit psychology: stopping before the auto-fail

Posted: Fri Sep 25, 2026 9:08 am
by FTtrader
How to use it:

1.) Open cTrader Automate.

2.) Click New cBot, name it DailyLossGuard.

3.) Paste the code, build it (Ctrl+B), and attach it to any single chart (it reads account-wide data, so it only needs to be on one chart).

4.) Set your Soft and Hard limits in your account currency.

You mentioned keeping a written definition of a "day over" that includes process strikes. How are you currently defining and tracking a process strike during your soft-throttle phase?

Re: Daily loss limit psychology: stopping before the auto-fail

Posted: Fri Sep 25, 2026 9:08 am
by FTtrader
Unlike cTrader, which hooks directly into your broker's API and can intercept manual mouse clicks, TradingView's Pine Script operates in a sandbox environment. A Pine Script strategy can only track and close the trades it executes on that specific chart. It cannot see your global account balance or block you from opening a manual trade on your phone.

However, you can still build the psychology backstop in Pine Script by tracking the automated strategy's equity curve and using TradingView's Webhook Alerts to fire a command to a third-party bridge (like PineConnector, AutoView, or TradersPost) to flatten your broker account and lock it down.

Re: Daily loss limit psychology: stopping before the auto-fail

Posted: Fri Sep 25, 2026 9:09 am
by FTtrader
Here is the Pine Script (v5) equivalent that monitors daily realized and unrealized PnL, changes the chart background to warn you, and triggers alerts when your limits are breached.

Code: Select all

//@version=5
strategy("Daily Loss Guard (Psychology Backstop)", overlay=true, calc_on_every_tick=true)

// --- Inputs ---
softLimit = input.float(80, title="Soft Limit (Currency)", minval=0)
hardLimit = input.float(100, title="Hard Limit (Currency)", minval=0)

// --- Daily PnL Tracking ---
var float startOfDayEquity = na
var bool  softHit = false
var bool  hardHit = false

// Detect new day based on the chart's timezone
isNewDay = ta.change(time("D")) != 0

// Reset variables at the start of a new trading day
if isNewDay or na(startOfDayEquity)
    startOfDayEquity := strategy.equity
    softHit := false
    hardHit := false

// Calculate Current Daily PnL (Closed + Open)
// By subtracting start of day equity from current equity, we get net daily PnL
dailyPnL = strategy.equity - startOfDayEquity

// --- Risk Management Logic ---
if dailyPnL <= -hardLimit
    if not hardHit // Ensure alert only fires once when breached
        // This alert message should be formatted for your webhook provider (e.g., PineConnector)
        // to send a "Close All" and "Disable Trading" command to MT4/cTrader.
        alert("HARD STOP HIT: Flattening account.", alert.freq_once_per_bar)
    
    hardHit := true
    strategy.close_all(comment="HARD STOP") // Flattens the strategy's open positions

else if dailyPnL <= -softLimit
    if not softHit
        alert("SOFT THROTTLE: Down -0.8R. Size down. A+ setups only.", alert.freq_once_per_bar)
    softHit := true

// --- Visual Dashboard ---
var table statusTable = table.new(position.top_right, 2, 2, frame_color=color.black, frame_width=1)

if barstate.islast
    table.cell(statusTable, 0, 0, "Daily PnL", text_color=color.white, bgcolor=color.gray)
    table.cell(statusTable, 1, 0, str.tostring(dailyPnL, "#.##"), text_color=color.white, bgcolor= dailyPnL < 0 ? color.red : color.green)
    
    statusText = hardHit ? "HARD STOP (DAY OVER)" : softHit ? "SOFT THROTTLE (A+ ONLY)" : "GUARD ACTIVE"
    statusColor = hardHit ? color.red : softHit ? color.orange : color.green
    table.cell(statusTable, 0, 1, "Status", text_color=color.white, bgcolor=color.gray)
    table.cell(statusTable, 1, 1, statusText, text_color=color.white, bgcolor=statusColor)

// Visual warnings: Orange background for soft throttle, Red for hard stop
bgcolor(hardHit ? color.new(color.red, 85) : softHit ? color.new(color.orange, 85) : na, title="Warning Background")


// --- Example Strategy Execution ---
// Replace this with your actual entry conditions
longCondition = ta.crossover(ta.sma(close, 14), ta.sma(close, 28))
shortCondition = ta.crossunder(ta.sma(close, 14), ta.sma(close, 28))

// CRITICAL: Wrap your entry logic in `not hardHit` to prevent revenge/re-entry 
if longCondition and not hardHit
    strategy.entry("Long", strategy.long)
if shortCondition and not hardHit
    strategy.entry("Short", strategy.short)

Re: Daily loss limit psychology: stopping before the auto-fail

Posted: Fri Sep 25, 2026 9:09 am
by FTtrader
Making the Hard Stop Binding

Because Pine Script cannot physically stop you from manually executing a trade on your broker's platform, the alert() function is your enforcer.

If you are using this to manage manual psychology rather than just backtesting an algo, you must route that alert via webhook to a platform manager. For example, if you send an alert to TradersPost or PineConnector, their syntax allows you to send a specific close_all command to your MT4/cTrader account, forcing the broker to flatten you regardless of what you try to do manually on the TradingView chart.

Are you using a third-party webhook bridge to connect TradingView alerts to your live brokerage account, or were you planning to use this script strictly as a visual monitor?