Page 2 of 2

Re: Pre-Friday afternoon checklist: news, levels, max risk

Posted: Fri Oct 02, 2026 9:37 am
by PTScalper
Because TradingView is a charting platform rather than a direct execution environment, a Pine Script strategy acts as a webhook firewall. Instead of closing an order after it hits the broker (like MT5), this script prevents the alert from ever being sent to your execution bridge (like PineConnector or 3Commas) in the first place.

Re: Pre-Friday afternoon checklist: news, levels, max risk

Posted: Fri Oct 02, 2026 9:37 am
by PTScalper
Here is the logic ported to Pine Script v5. It uses the strategy architecture to track your simulated weekly P&L and utilizes a table to recreate the Guardian UI overlay directly on your chart.

Code: Select all

//@version=5
strategy("Friday Guardian", overlay = true, calc_on_every_tick = true, initial_capital = 10000)

// =====================================================================
// 1. INPUTS & TIME SETTINGS
// =====================================================================
grpClock = "--- 1. The Clock ---"
blockHour = input.int(14, "Block Risk Hour (Exchange Time)", group = grpClock, minval = 0, maxval = 23)
blockMin  = input.int(0,  "Block Risk Minute", group = grpClock, minval = 0, maxval = 59)

grpHardClose = "--- 2. Manage Risk ---"
hardCloseEnable = input.bool(true, "Enable Hard Close", group = grpHardClose)
hardCloseHour   = input.int(16, "Hard Close Hour", group = grpHardClose, minval = 0, maxval = 23)
hardCloseMin    = input.int(0,  "Hard Close Minute", group = grpHardClose, minval = 0, maxval = 59)

// Note: Pine Script cannot access real-time bid/ask spread historically. 
// The spread microstructure rule is omitted; rely on the time boundaries.

// =====================================================================
// 2. TIME & STATE CALCULATIONS
// =====================================================================
// Using exchange timezone so it aligns with the chart axis automatically
isFriday = dayofweek(time) == dayofweek.friday

currentMins = hour(time) * 60 + minute(time)
blockMins   = blockHour * 60 + blockMin
hardMins    = hardCloseHour * 60 + hardCloseMin

isLockdownActive  = isFriday and currentMins >= blockMins
isHardCloseActive = isFriday and hardCloseEnable and currentMins >= hardMins

// =====================================================================
// 3. WEEKLY P&L TRACKING
// =====================================================================
// Detect the first bar of a new week to reset the baseline
var float startOfWeekRealized = 0.0
isNewWeek = ta.change(time("W")) != 0

if isNewWeek
    startOfWeekRealized := strategy.netprofit

// Current realized P&L for the week
weeklyPnL = strategy.netprofit - startOfWeekRealized

// =====================================================================
// 4. GUARDIAN UI OVERLAY
// =====================================================================
var table ui = table.new(position.top_right, 1, 4, bgcolor = color.new(color.black, 15), border_color = color.gray, border_width = 1)

if barstate.islast
    // Header
    table.cell(ui, 0, 0, "--- FRIDAY GUARDIAN ---", text_color = color.white, text_size = size.small)
    
    // P&L Status
    string pnlText = "Weekly P&L: " + str.tostring(weeklyPnL, "#.##") + " " + syminfo.currency
    color pnlColor = weeklyPnL > 0 ? color.lime : (weeklyPnL < 0 ? color.red : color.white)
    string weekStatus = weeklyPnL > 0 ? "\nGREEN WEEK: Protect premium." : (weeklyPnL < 0 ? "\nRED WEEK: No recovery size." : "")
    table.cell(ui, 0, 1, pnlText + weekStatus, text_color = pnlColor, text_size = size.small)
    
    // Microstructure note
    table.cell(ui, 0, 2, "Spread: [Hidden by TradingView]", text_color = color.gray, text_size = size.small)
    
    // System Status
    string statusText = "SYSTEM: Standard Weekday"
    color statusColor = color.white
    
    if isFriday
        if isHardCloseActive
            statusText  := "SYSTEM: HARD CLOSE ACTIVE\nFlattening all risk."
            statusColor := color.red
        else if isLockdownActive
            statusText  := "SYSTEM: LOCKDOWN ACTIVE\nNo new risk allowed."
            statusColor := color.orange
        else
            statusText  := "SYSTEM: Safe to trade until\n" + str.tostring(blockHour, "00") + ":" + str.tostring(blockMin, "00")
            statusColor := color.yellow
            
    table.cell(ui, 0, 3, statusText, text_color = statusColor, text_size = size.small)

// =====================================================================
// 5. STRATEGY EXECUTION (EXAMPLE LOGIC)
// =====================================================================
// Replace this with your actual MQL/Pine Script indicator conditions
bool myLongCondition  = ta.crossover(ta.sma(close, 9), ta.sma(close, 21))
bool myShortCondition = ta.crossunder(ta.sma(close, 9), ta.sma(close, 21))

// Only allow entries if Lockdown is NOT active
if myLongCondition and not isLockdownActive and not isHardCloseActive
    strategy.entry("Long", strategy.long)

if myShortCondition and not isLockdownActive and not isHardCloseActive
    strategy.entry("Short", strategy.short)

// Force close all positions when Hard Close hits
if isHardCloseActive and strategy.position_size != 0
    strategy.close_all(comment = "Friday Guardian: Hard Close")

Re: Pre-Friday afternoon checklist: news, levels, max risk

Posted: Fri Oct 02, 2026 9:38 am
by PTScalper
Key Differences in the Pine Environment

Missing Microstructure: Pine Script v5 does not expose real-time broker bid/ask spread data to strategies. You cannot programmatically block trades based on spread widening here—you must rely entirely on the blockMins and hardMins thresholds to keep you out of the thinned order books.

Exchange Time vs Local Time: MT4/MT5 use broker time (TimeLocal() or TimeCurrent()). Pine Script's hour(time) references the Exchange Timezone of the chart by default. If you trade EURUSD, this is usually UTC or UTC-4/UTC-5 depending on the feed. You must align your input parameters with the timezone selected at the bottom right of your TradingView chart.

The Firewall Execution: If you use this script to send JSON webhooks to a broker, the strategy.entry() commands simply will not trigger once isLockdownActive turns true. No rogue alerts will fire, entirely cutting off the pipeline before your broker even knows about the setup.

Re: Pre-Friday afternoon checklist: news, levels, max risk

Posted: Fri Oct 02, 2026 9:39 am
by PTScalper
Because MQL4 uses a fundamentally different order accounting system than MQL5 (a single order pool rather than distinct "Positions" and "Orders"), porting this requires explicitly handling trade types and manual price refreshes.

Here is the exact Friday Guardian logic translated into strict, production-ready MQL4.

Code: Select all

//+------------------------------------------------------------------+
//|                                        FridayGuardian.mq4        |
//|                        Enforces Friday microstructure rules      |
//+------------------------------------------------------------------+
#property copyright "Custom MQL4"
#property version   "1.00"
#property strict

input group "--- 1. The Clock ---"
input int    BlockNewRiskHour     = 14;      // No New Risk: Hour (Broker Time)
input int    BlockNewRiskMinute   = 0;       // No New Risk: Minute

input group "--- 2. Manage Open Risk ---"
input bool   HardCloseEnabled     = true;    // Force close remaining risk later?
input int    HardCloseHour        = 16;      // Hard Close: Hour
input int    HardCloseMinute      = 0;       // Hard Close: Minute

input group "--- 3. Microstructure ---"
input int    MaxAllowedSpreadPts  = 15;      // Max Spread (Points) for Majors vs Metals

//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
   datetime now = TimeCurrent();
   int dayOfWeek = TimeDayOfWeek(now); // 0=Sun, 1=Mon, ..., 5=Fri, 6=Sat
   int currentHour = TimeHour(now);
   int currentMin = TimeMinute(now);
   
   int currentSpread = (int)MarketInfo(Symbol(), MODE_SPREAD);
   bool isSpreadWide = (currentSpread > MaxAllowedSpreadPts);
   
   int currentMinsOfDay = (currentHour * 60) + currentMin;
   int blockRiskMins    = (BlockNewRiskHour * 60) + BlockNewRiskMinute;
   int hardCloseMins    = (HardCloseHour * 60) + HardCloseMinute;
   
   bool isFriday = (dayOfWeek == 5);
   bool isLockdownActive = isFriday && (currentMinsOfDay >= blockRiskMins);
   bool isHardCloseActive = isFriday && HardCloseEnabled && (currentMinsOfDay >= hardCloseMins);

   // Build the UI Overlay
   string uiText = "--- FRIDAY MICROSTRUCTURE GUARDIAN ---\n\n";
   
   // Track Week Status (Checklist #5)
   double weeklyPnL = GetWeeklyPnL(now, dayOfWeek, currentHour, currentMin, TimeSeconds(now));
   uiText += StringFormat("Weekly P&L: %.2f %s\n", weeklyPnL, AccountCurrency());
   
   if(weeklyPnL > 0) uiText += "Status: GREEN WEEK. Protect the premium.\n";
   else if(weeklyPnL < 0) uiText += "Status: RED WEEK. No recovery sizing.\n";
   
   uiText += StringFormat("\nSpread: %d pts (Max Allowed: %d)\n", currentSpread, MaxAllowedSpreadPts);
   if(isSpreadWide) uiText += "WARNING: Spread exceeds max limit. Illiquid book.\n";
      
   uiText += "\n";
   
   // Execute Defense Mechanisms
   if(isFriday)
     {
      if(isHardCloseActive)
        {
         uiText += "SYSTEM: HARD CLOSE ACTIVE. Flattening all risk.\n";
         CloseAllSymbolOrders();
        }
      else if(isLockdownActive)
        {
         uiText += "SYSTEM: LOCKDOWN ACTIVE. No new risk allowed.\n";
         EnforceNoNewRisk(blockRiskMins);
        }
      else
        {
         uiText += StringFormat("SYSTEM: Safe to trade until %02d:%02d broker time.\n", BlockNewRiskHour, BlockNewRiskMinute);
        }
     }
   else
     {
      uiText += "SYSTEM: Standard weekday rules apply.";
     }
     
   Comment(uiText);
  }

//+------------------------------------------------------------------+
//| Instantly closes any position opened AFTER the cutoff time       |
//+------------------------------------------------------------------+
void EnforceNoNewRisk(int blockRiskMins)
  {
   // Loop backwards because closing orders shifts the index
   for(int i = OrdersTotal() - 1; i >= 0; i--)
     {
      if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
        {
         if(OrderSymbol() == Symbol())
           {
            datetime openTime = OrderOpenTime();
            int openDay = TimeDayOfWeek(openTime);
            int openMinsOfDay = (TimeHour(openTime) * 60) + TimeMinute(openTime);
            
            // If a position was initiated after the Friday cutoff, nuke it.
            if(openDay == 5 && openMinsOfDay >= blockRiskMins)
              {
               Print("Guardian: Unauthorized Friday trade detected. Nuke ticket #", OrderTicket());
               CloseOrDeleteCurrentOrder();
              }
           }
        }
     }
  }

//+------------------------------------------------------------------+
//| Closes all open market and pending orders for the symbol         |
//+------------------------------------------------------------------+
void CloseAllSymbolOrders()
  {
   for(int i = OrdersTotal() - 1; i >= 0; i--)
     {
      if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
        {
         if(OrderSymbol() == Symbol())
           {
            CloseOrDeleteCurrentOrder();
           }
        }
     }
  }

//+------------------------------------------------------------------+
//| Handles closing both Market and Pending order types              |
//+------------------------------------------------------------------+
void CloseOrDeleteCurrentOrder()
  {
   int type = OrderType();
   int ticket = OrderTicket();
   double lots = OrderLots();
   
   RefreshRates();
   
   if(type == OP_BUY)
     {
      OrderClose(ticket, lots, Bid, 10, clrRed);
     }
   else if(type == OP_SELL)
     {
      OrderClose(ticket, lots, Ask, 10, clrRed);
     }
   else if(type >= OP_BUYLIMIT && type <= OP_SELLSTOP)
     {
      OrderDelete(ticket);
     }
  }

//+------------------------------------------------------------------+
//| Calculates Net P&L for the current week                          |
//+------------------------------------------------------------------+
double GetWeeklyPnL(datetime now, int dayOfWeek, int h, int m, int s)
  {
   // Map day index to find Monday midnight (0=Sun, 1=Mon)
   int daysToMonday = (dayOfWeek == 0) ? 6 : (dayOfWeek - 1);
   datetime startOfWeek = now - (daysToMonday * 86400) - (h * 3600) - (m * 60) - s;
   
   double pnl = 0;
   
   // Loop through history pool
   for(int i = 0; i < OrdersHistoryTotal(); i++)
     {
      if(OrderSelect(i, SELECT_BY_POS, MODE_HISTORY))
        {
         if(OrderCloseTime() >= startOfWeek)
           {
            pnl += OrderProfit();
            pnl += OrderCommission();
            pnl += OrderSwap();
           }
        }
     }
   return pnl;
  }

Re: Pre-Friday afternoon checklist: news, levels, max risk

Posted: Fri Oct 02, 2026 9:39 am
by PTScalper
Architectural Shifts from MT5 to MT4

Execution Handling (CloseOrDeleteCurrentOrder): MT5's CTrade library abstracts the closing process. In MT4, you must explicitly check OrderType(), call RefreshRates() to ensure you aren't using stale pricing, and match OP_BUY closures against the Bid and OP_SELL against the Ask.

Pending Orders: Because MT4 groups active trades and pending limits/stops into the exact same active pool (MODE_TRADES), the Guardian will aggressively delete limit orders (like a buy limit waiting at a swept liquidity pool) as soon as the lockdown activates, ensuring an untriggered order doesn't accidentally execute into a widening spread.

History Traversal: MT4 requires stepping through OrdersHistoryTotal() and filtering by OrderCloseTime() rather than MT5's cleaner HistorySelect(start, end) boundary query.

Re: Pre-Friday afternoon checklist: news, levels, max risk

Posted: Fri Oct 02, 2026 9:40 am
by PTScalper
To elevate this from a simple script to a professional, institutional-grade Expert Advisor, we need to address the realities of live MT4 execution.

A "pro" utility doesn't just issue a close command; it anticipates broker requotes, handles slippage, avoids spamming your terminal with duplicate alerts, and visually presents data cleanly without using the clumsy Comment() function.

Here is the Friday Guardian Pro.

Re: Pre-Friday afternoon checklist: news, levels, max risk

Posted: Fri Oct 02, 2026 9:41 am
by PTScalper
What makes this version "Pro":

Execution Retries: MT4 brokers frequently reject OrderClose requests during volatile Friday afternoons (Error 136: Off Quotes, or Error 138: Requote). This version implements an aggressive 3-attempt retry loop with execution delays.

State Debouncing: It tracks system states (isLockdownActive, isHardCloseActive) and sends Push Notifications to your phone exactly once when the state changes, rather than spamming your log on every tick.

Scope Control: Added the ability to apply the lockdown to the entire account (all symbols and magic numbers) rather than just the chart it is attached to.

On-Chart HUD: Replaces the messy Comment() block with anchored OBJ_LABEL graphics for a clean, non-intrusive terminal overlay.

Code: Select all

//+------------------------------------------------------------------+
//|                                     FridayGuardian_Pro.mq4       |
//|                   Institutional Friday Microstructure Guardian   |
//+------------------------------------------------------------------+
#property copyright "Custom MQL4 Pro"
#property version   "2.00"
#property strict

input group "--- 1. The Clock ---"
input int    BlockNewRiskHour     = 14;      // No New Risk: Hour (Broker Time)
input int    BlockNewRiskMinute   = 0;       // No New Risk: Minute

input group "--- 2. Risk Management ---"
input bool   HardCloseEnabled     = true;    // Force close remaining risk later?
input int    HardCloseHour        = 16;      // Hard Close: Hour
input int    HardCloseMinute      = 0;       // Hard Close: Minute
input int    MaxSlippagePoints    = 30;      // Max Slippage allowed on close

input group "--- 3. Microstructure ---"
input int    MaxAllowedSpreadPts  = 15;      // Max Spread (Points) limit
input bool   ApplyToAllSymbols    = false;   // Guardian protects entire account?

input group "--- 4. Notifications ---"
input bool   SendPushAlerts       = true;    // Send MT4 Push Notifications?

// State Tracking to prevent alert spam
bool lockdownNotified = false;
bool hardCloseNotified = false;
int currentDayTracker = -1;

//+------------------------------------------------------------------+
//| Initialization                                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
   CreateHUD();
   return(INIT_SUCCEEDED);
  }

void OnDeinit(const int reason)
  {
   ObjectsDeleteAll(0, "FG_");
  }

//+------------------------------------------------------------------+
//| Main Tick Loop                                                   |
//+------------------------------------------------------------------+
void OnTick()
  {
   datetime now = TimeCurrent();
   int dayOfWeek = TimeDayOfWeek(now); 
   int currentHour = TimeHour(now);
   int currentMin = TimeMinute(now);
   
   // Reset notification state on a new day
   if(dayOfWeek != currentDayTracker)
     {
      lockdownNotified = false;
      hardCloseNotified = false;
      currentDayTracker = dayOfWeek;
     }
   
   int currentSpread = (int)MarketInfo(Symbol(), MODE_SPREAD);
   bool isSpreadWide = (currentSpread > MaxAllowedSpreadPts);
   
   int currentMinsOfDay = (currentHour * 60) + currentMin;
   int blockRiskMins    = (BlockNewRiskHour * 60) + BlockNewRiskMinute;
   int hardCloseMins    = (HardCloseHour * 60) + HardCloseMinute;
   
   bool isFriday = (dayOfWeek == 5);
   bool isLockdownActive = isFriday && (currentMinsOfDay >= blockRiskMins);
   bool isHardCloseActive = isFriday && HardCloseEnabled && (currentMinsOfDay >= hardCloseMins);

   double weeklyPnL = GetWeeklyPnL(now, dayOfWeek, currentHour, currentMin, TimeSeconds(now));

   // Execute Defense Mechanisms
   if(isFriday)
     {
      if(isHardCloseActive)
        {
         if(!hardCloseNotified) TriggerAlert("SYSTEM: HARD CLOSE ACTIVE. Flattening book.");
         hardCloseNotified = true;
         CloseAllOrders();
        }
      else if(isLockdownActive)
        {
         if(!lockdownNotified) TriggerAlert("SYSTEM: LOCKDOWN ACTIVE. No new risk allowed.");
         lockdownNotified = true;
         EnforceNoNewRisk(blockRiskMins);
        }
     }
     
   UpdateHUD(isFriday, isLockdownActive, isHardCloseActive, weeklyPnL, currentSpread, isSpreadWide);
  }

//+------------------------------------------------------------------+
//| Alert Dispatcher                                                 |
//+------------------------------------------------------------------+
void TriggerAlert(string message)
  {
   Print(message);
   if(SendPushAlerts) SendNotification(message);
  }

//+------------------------------------------------------------------+
//| Audits open risk against the cutoff time                         |
//+------------------------------------------------------------------+
void EnforceNoNewRisk(int blockRiskMins)
  {
   for(int i = OrdersTotal() - 1; i >= 0; i--)
     {
      if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
        {
         if(ApplyToAllSymbols || OrderSymbol() == Symbol())
           {
            datetime openTime = OrderOpenTime();
            if(TimeDayOfWeek(openTime) == 5)
              {
               int openMinsOfDay = (TimeHour(openTime) * 60) + TimeMinute(openTime);
               if(openMinsOfDay >= blockRiskMins)
                 {
                  Print("Guardian: Unauthorized Friday risk detected. Ticket #", OrderTicket());
                  CloseOrDeleteOrderWithRetry(OrderTicket());
                 }
              }
           }
        }
     }
  }

//+------------------------------------------------------------------+
//| Flattens target portfolio                                        |
//+------------------------------------------------------------------+
void CloseAllOrders()
  {
   for(int i = OrdersTotal() - 1; i >= 0; i--)
     {
      if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
        {
         if(ApplyToAllSymbols || OrderSymbol() == Symbol())
           {
            CloseOrDeleteOrderWithRetry(OrderTicket());
           }
        }
     }
  }

//+------------------------------------------------------------------+
//| Professional Execution Closure with Retry Logic                  |
//+------------------------------------------------------------------+
bool CloseOrDeleteOrderWithRetry(int ticket)
  {
   if(!OrderSelect(ticket, SELECT_BY_TICKET)) return false;
   
   int type = OrderType();
   double lots = OrderLots();
   int max_retries = 3;
   
   for(int attempt = 1; attempt <= max_retries; attempt++)
     {
      RefreshRates();
      double closePrice = (type == OP_BUY) ? MarketInfo(OrderSymbol(), MODE_BID) : MarketInfo(OrderSymbol(), MODE_ASK);
      bool success = false;
      
      if(type == OP_BUY || type == OP_SELL)
        {
         success = OrderClose(ticket, lots, closePrice, MaxSlippagePoints, clrRed);
        }
      else if(type >= OP_BUYLIMIT && type <= OP_SELLSTOP)
        {
         success = OrderDelete(ticket, clrRed);
        }
        
      if(success) return true;
      
      int err = GetLastError();
      PrintFormat("Guardian: Failed to close ticket #%d (Attempt %d/%d). Error: %d", ticket, attempt, max_retries, err);
      Sleep(500); // Wait 500ms before retrying to let liquidity refill
     }
   return false;
  }

//+------------------------------------------------------------------+
//| Weekly Profit Calculation                                        |
//+------------------------------------------------------------------+
double GetWeeklyPnL(datetime now, int dayOfWeek, int h, int m, int s)
  {
   int daysToMonday = (dayOfWeek == 0) ? 6 : (dayOfWeek - 1);
   datetime startOfWeek = now - (daysToMonday * 86400) - (h * 3600) - (m * 60) - s;
   double pnl = 0;
   
   for(int i = 0; i < OrdersHistoryTotal(); i++)
     {
      if(OrderSelect(i, SELECT_BY_POS, MODE_HISTORY))
        {
         if(OrderCloseTime() >= startOfWeek)
           {
            if(ApplyToAllSymbols || OrderSymbol() == Symbol())
              {
               pnl += OrderProfit() + OrderCommission() + OrderSwap();
              }
           }
        }
     }
   return pnl;
  }

//+------------------------------------------------------------------+
//| HUD Creation & Rendering                                         |
//+------------------------------------------------------------------+
void CreateHUD()
  {
   string labels[4] = {"FG_Title", "FG_PnL", "FG_Spread", "FG_Status"};
   for(int i=0; i<4; i++)
     {
      ObjectCreate(0, labels[i], OBJ_LABEL, 0, 0, 0);
      ObjectSetInteger(0, labels[i], OBJPROP_CORNER, CORNER_LEFT_UPPER);
      ObjectSetInteger(0, labels[i], OBJPROP_XDISTANCE, 20);
      ObjectSetInteger(0, labels[i], OBJPROP_YDISTANCE, 20 + (i * 20));
      ObjectSetString(0, labels[i], OBJPROP_FONT, "Trebuchet MS");
      ObjectSetInteger(0, labels[i], OBJPROP_FONTSIZE, 9);
     }
  }

void UpdateHUD(bool isFriday, bool isLockdown, bool isHardClose, double pnl, int spread, bool spreadWide)
  {
   ObjectSetString(0, "FG_Title", OBJPROP_TEXT, "--- FRIDAY GUARDIAN PRO ---");
   ObjectSetInteger(0, "FG_Title", OBJPROP_COLOR, clrSilver);

   string pnlText = StringFormat("Weekly P&L: %.2f %s", pnl, AccountCurrency());
   string pnlStatus = (pnl > 0) ? " [GREEN WEEK]" : ((pnl < 0) ? " [RED WEEK]" : "");
   ObjectSetString(0, "FG_PnL", OBJPROP_TEXT, pnlText + pnlStatus);
   ObjectSetInteger(0, "FG_PnL", OBJPROP_COLOR, (pnl > 0) ? clrLimeGreen : ((pnl < 0) ? clrRed : clrWhite));

   ObjectSetString(0, "FG_Spread", OBJPROP_TEXT, StringFormat("Spread: %d pts", spread));
   ObjectSetInteger(0, "FG_Spread", OBJPROP_COLOR, spreadWide ? clrOrange : clrSilver);

   string statusStr = "SYSTEM: Standard Weekday";
   color statusClr = clrSilver;
   
   if(isFriday)
     {
      if(isHardClose)       { statusStr = "SYSTEM: HARD CLOSE ACTIVE"; statusClr = clrRed; }
      else if(isLockdown)   { statusStr = "SYSTEM: LOCKDOWN ACTIVE"; statusClr = clrOrange; }
      else                  { statusStr = StringFormat("SYSTEM: Safe until %02d:%02d", BlockNewRiskHour, BlockNewRiskMinute); statusClr = clrDeepSkyBlue; }
     }
     
   ObjectSetString(0, "FG_Status", OBJPROP_TEXT, statusStr);
   ObjectSetInteger(0, "FG_Status", OBJPROP_COLOR, statusClr);
   
   ChartRedraw();
  }

Re: Pre-Friday afternoon checklist: news, levels, max risk

Posted: Mon Oct 05, 2026 8:16 am
by LondonScalper
Clock first, spread as the enforcement — that matches how the Friday card actually behaves on my desk.

I write the flat-by time before lunch. After that, new risk is closed even if the spread still looks fine. The spread filter catches the earlier rot: if cable is already 1.5× my normal London width at 13:30, I do not wait for the written clock to save me.

Where I still get caught is managing an open winner past the line “just until the next M5 close.” That is why the card says manage-only or flat, not “use judgement.” Judgement on a Friday afternoon is how last week’s P&L becomes this week’s story.

Re: Pre-Friday afternoon checklist: news, levels, max risk

Posted: Sun Oct 18, 2026 1:35 pm
by FXS Prop Desk
A clever use of an EA to enforce the clock. One thing to make sure of: the EA should identify positions opened manually as well as by other EAs, by checking the magic number or the comment. Otherwise it might close trades from another strategy running on the same account.

Some traders also prefer to make the EA send a notification when it closes a trade, so the trader knows immediately that a rule was enforced.

Re: Pre-Friday afternoon checklist: news, levels, max risk

Posted: Fri Oct 30, 2026 9:20 am
by Shadow Trader
The usual warning says Friday afternoon is where accounts go to die. Position squaring, thin liquidity, weekend risk. Fair enough. Yet Thursday gets a pass it doesn't deserve.

Thursday often carries a lot of event risk. Central bank decisions from the ECB and the Bank of England commonly land on Thursdays, American weekly jobless claims print at 8:30 New York time every Thursday, and big inflation or GDP numbers turn up late in the week. Traders are also carrying a week of positions into it, and half-hearted trends from Monday to Wednesday often reverse.

Friday, meanwhile, drifts toward the weekend. Many desks cut risk, which can mean range compression after the London lunch lull. Quiet isn't the same as dangerous. The danger is sudden spread widening late in the day.

So the contrarian view: treat Thursday as the day of the surprise and Friday as the day of the shrink. Each needs different handling, and a flat "avoid Fridays" rule throws away a lot of calm hours.

When results are sorted by weekday, which one has hurt your account most, and did it match what the forums told you?