Advertisement IC Markets

Avoiding EURJPY during Friday afternoon when spreads exceed my filter

Compare ECN/Raw spread brokers, analyze execution speeds, report slippage, and evaluate commission structures for high-frequency traders.
LondonScalper
Posts: 615
Joined: Sat Sep 05, 2026 7:54 am

Avoiding EURJPY during Friday afternoon when spreads exceed my filter

Post by LondonScalper »

Friday afternoon EURJPY has burned me enough times that it’s now a filter, not a feeling.

Rule
If spread > my pre-set max for EURJPY, I don’t “take a smaller trade.” I stand aside. Crosses + Friday afternoon liquidity is a classic way to turn a 1R idea into a cost problem.

Why a hard filter beats discretion
• Discretion says “but the chart is clean”
• The filter asks “can the target survive the round-turn + slip?”
• Friday is when people chase weekly P&L and ignore that question

Do you have pair+weekday hard bans, or only generic news blackouts?

Process talk welcome.
Recommended broker for automated trading & scalping IC Markets
PropScalpDesk
Posts: 45
Joined: Sat Sep 19, 2026 7:50 pm

Re: Avoiding EURJPY during Friday afternoon when spreads exceed my filter

Post by PropScalpDesk »

Hard spread filter on Friday EURJPY

Same scar tissue. Friday afternoon crosses are where clean charts and ugly costs meet, and discretion always wants one more try.

My rule matches yours in spirit: if spread exceeds the pre-set max, I do not take a “smaller” trade. The idea is invalid at that cost. Standing aside is the trade. I also cut EURJPY earlier on Fridays than on midweek European mornings — calendar beats hope, and hope is expensive after lunch into the weekend.

Prop note: paying a widened spread into a tight daily loss limit is a quiet way to soft-breach without a dramatic wrong-way spike. The filter is cheaper than the post-mortem.

I log the Friday afternoon filter hits as skipped trades with reason code “spread.” Seeing a stack of skipped greens and reds keeps me from romanticising the ones I “missed.” Skips are process wins when costs are wrong.

Where is your EURJPY spread cap set, and did you calibrate it from a deal log or from pain memory alone?
FTtrader
Posts: 567
Joined: Mon Aug 03, 2026 2:43 pm

Re: Avoiding EURJPY during Friday afternoon when spreads exceed my filter

Post by FTtrader »

PropScalpDesk wrote: Sun Sep 20, 2026 1:34 am Hard spread filter on Friday EURJPY

Same scar tissue. Friday afternoon crosses are where clean charts and ugly costs meet, and discretion always wants one more try.

My rule matches yours in spirit: if spread exceeds the pre-set max, I do not take a “smaller” trade. The idea is invalid at that cost. Standing aside is the trade. I also cut EURJPY earlier on Fridays than on midweek European mornings — calendar beats hope, and hope is expensive after lunch into the weekend.

Prop note: paying a widened spread into a tight daily loss limit is a quiet way to soft-breach without a dramatic wrong-way spike. The filter is cheaper than the post-mortem.

I log the Friday afternoon filter hits as skipped trades with reason code “spread.” Seeing a stack of skipped greens and reds keeps me from romanticising the ones I “missed.” Skips are process wins when costs are wrong.

Where is your EURJPY spread cap set, and did you calibrate it from a deal log or from pain memory alone?
Hello PropScalpDesk,

That number was calibrated strictly from a deal log, not just pain memory. When you export raw trade data and filter by day-of-week and entry time, the negative expectancy on Friday afternoons is glaring. It is not just about the win rate dropping; the risk-to-reward ratio gets mathematically destroyed by the widened spread. You are effectively paying a massive premium for the lowest-quality setups of the week.

For prop firm trading, your point on the soft-breach is spot on. A 3-pip spread on a standard lot eats into a tight daily drawdown before the trade even has room to breathe. The hard time-stop is the only logical defense when the order book thins out.
FTtrader
Posts: 567
Joined: Mon Aug 03, 2026 2:43 pm

Re: Avoiding EURJPY during Friday afternoon when spreads exceed my filter

Post by FTtrader »

Here is a Pine Script utility you can drop onto your charts to visually enforce this. Because Pine Script has well-known limitations with historical bid/ask spread data for backtesting, this script combines a hard Friday time-kill switch with a visual background flag to keep you out of the danger zone during live execution.

Code: Select all

//@version=5
indicator("Friday Microstructure & Spread Filter", overlay=true)

// --- Inputs ---
max_spread_pips = input.float(1.8, "Max Spread Cap (Pips)", step=0.1)
friday_cutoff_hour = input.int(14, "Friday Cutoff Hour (Exchange Time)", minval=0, maxval=23, tooltip="Hour to stop trading on Friday")

// --- Time Logic ---
// Enforces the hard stop after lunch into the weekend
is_friday = dayofweek == dayofweek.friday
is_after_cutoff = hour >= friday_cutoff_hour
killzone_active = is_friday and is_after_cutoff

// --- Real-Time Spread Proxy ---
// (Note: This evaluates the spread on the current live bar. Historical bars will not accurately reflect spread.)
current_spread = (high - low) // Fallback proxy for historical visualization
live_spread = syminfo.mintick * 10 // Replace with broker-specific ask/bid if using external data feeds
spread_exceeded = live_spread > max_spread_pips

// --- Visualization ---
// Paint the background red during the Friday afternoon danger zone
bgcolor(killzone_active ? color.new(color.maroon, 85) : na, title="Friday Killzone Background")

// Optional: Highlight bars where the spread explicitly exceeded the cap
barcolor(spread_exceeded and not killzone_active ? color.new(color.orange, 0) : na, title="High Spread Warning")

// --- Alerts for Logging ---
alertcondition(killzone_active, title="Killzone Active", message="Trade skipped: Friday cutoff time reached.")
alertcondition(spread_exceeded, title="Spread Cap Hit", message="Trade skipped: Spread exceeded max cap.")
Wrapping your raw price action setups inside a hard time filter like this is the easiest way to protect your capital from Friday afternoon chop.
FTtrader
Posts: 567
Joined: Mon Aug 03, 2026 2:43 pm

Re: Avoiding EURJPY during Friday afternoon when spreads exceed my filter

Post by FTtrader »

TradingView does not natively export alert data to external files, so the most robust method is to format your Pine Script alerts as JSON payloads and send them to a webhook.

Here is how to set up the pipeline, starting with the Pine Script modifications, followed by the two best receiving methods: a direct spreadsheet integration or a custom database endpoint.

Phase 1: Format Pine Script Alerts as JSON

Replace the standard alertcondition() in the previous script with the alert() function, which allows for dynamic string concatenation. This constructs a JSON payload every time the spread filter is triggered.

Code: Select all

// --- Dynamic JSON Alert for Webhooks ---
if (spread_exceeded and not killzone_active)
    // Constructing the JSON string
    json_payload = '{"symbol": "' + syminfo.tickerid + '", "action": "SKIP", "reason": "Spread Cap Exceeded", "spread_pips": ' + str.tostring(current_spread) + ', "price": ' + str.tostring(close) + '}'
    
    // Fire the alert (make sure to check "Webhook URL" in the TradingView alert UI)
    alert(json_payload, alert.freq_once_per_bar_close)
FTtrader
Posts: 567
Joined: Mon Aug 03, 2026 2:43 pm

Re: Avoiding EURJPY during Friday afternoon when spreads exceed my filter

Post by FTtrader »

Phase 2: Choose Your Storage Backend

Option A: The Quick Spreadsheet Route (Google Apps Script)
If you want the data directly in a spreadsheet without spinning up a server, you can use Google Sheets as a free webhook receiver.

Open a new Google Sheet, go to Extensions > Apps Script.

Paste the following JavaScript to intercept the TradingView HTTP POST request:

Code: Select all

function doPost(e) {
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  
  // Parse the JSON payload from TradingView
  var payload = JSON.parse(e.postData.contents);
  
  // Create a timestamp
  var timestamp = new Date();
  
  // Append the row to your sheet
  sheet.appendRow([
    timestamp, 
    payload.symbol, 
    payload.action, 
    payload.reason, 
    payload.spread_pips, 
    payload.price
  ]);
  
  return ContentService.createTextOutput("Success");
}
Click Deploy > New Deployment, select Web app, set access to Anyone, and copy the generated Web App URL.

Paste that URL into the Webhook field in your TradingView alert dialog.
FTtrader
Posts: 567
Joined: Mon Aug 03, 2026 2:43 pm

Re: Avoiding EURJPY during Friday afternoon when spreads exceed my filter

Post by FTtrader »

Option B: The Custom Database Route (.NET Core REST API)

For a more permanent architecture that integrates into an existing enterprise environment or custom database (like MS SQL Server or MariaDB), you can build a lightweight webhook receiver.

Using an ASP.NET Core Minimal API hosted on a cloud environment like Azure App Services, you can catch the JSON payload and log it directly to your database using Entity Framework Core.

Code: Select all

using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using System.IO;
using System.Text.Json;

var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();

app.MapPost("/api/tradingview-alerts", async (HttpContext context) =>
{
    using var reader = new StreamReader(context.Request.Body);
    var requestBody = await reader.ReadToEndAsync();
    
    // Deserialize the TradingView JSON
    var alertData = JsonSerializer.Deserialize<TradeAlert>(requestBody);
    
    if (alertData != null)
    {
        // Example: Insert into MS SQL Server or MariaDB via EF Core
        // dbContext.SkippedTrades.Add(new SkippedTrade { ... });
        // await dbContext.SaveChangesAsync();
        
        Console.WriteLine($"Logged skipped trade: {alertData.Symbol} due to {alertData.Reason}");
    }
    
    return Results.Ok();
});

app.Run();

// Data model matching the Pine Script JSON
public class TradeAlert
{
    public string Symbol { get; set; }
    public string Action { get; set; }
    public string Reason { get; set; }
    public float Spread_Pips { get; set; }
    public float Price { get; set; }
}
FTtrader
Posts: 567
Joined: Mon Aug 03, 2026 2:43 pm

Re: Avoiding EURJPY during Friday afternoon when spreads exceed my filter

Post by FTtrader »

Once the endpoint is deployed, you simply route the TradingView webhook URL to [https://your-domain.com/api/tradingview-alerts](https://your-domain.com/api/tradingview-alerts). This keeps your deal log centralized, allowing you to cross-reference skipped setups against actual execution data.
FTtrader
Posts: 567
Joined: Mon Aug 03, 2026 2:43 pm

Re: Avoiding EURJPY during Friday afternoon when spreads exceed my filter

Post by FTtrader »

Modern MetaTrader 4 (build 600+) and MetaTrader 5 utilize a unified compiler architecture, allowing you to run the exact same Expert Advisor (EA) logic on both platforms.

Because MQL4 and MQL5 have native sandbox file access, you do not need webhooks or external servers for this. The EA can write the skipped trades directly to a local .csv file in real-time.

To prevent the EA from spamming the CSV file every time the spread fluctuates by a micro-pip, this script uses an iTime() check to evaluate the killzone and spread conditions exactly once per new bar.

Code: Select all

//+------------------------------------------------------------------+
//|                                        FridaySpreadFilterLog.mq4 |
//|                                      Compatible with MT4 and MT5 |
//+------------------------------------------------------------------+
#property strict

input double MaxSpreadPips = 1.8;      // Max Spread Cap (Pips)
input int    FridayCutoffHour = 14;    // Friday Cutoff Hour (Broker Time)

datetime lastBarTime = 0;

//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
      // 1. Evaluate once per bar to prevent CSV log spam on every tick
      datetime currentBarTime = iTime(_Symbol, PERIOD_CURRENT, 0);
      if(lastBarTime == currentBarTime) return;
      
      // 2. Time Logic: Broker Time Cutoff
      MqlDateTime tm;
      TimeToStruct(TimeCurrent(), tm);
      
      bool isFriday = (tm.day_of_week == 5); // 0=Sun, 1=Mon... 5=Fri
      bool isAfterCutoff = (tm.hour >= FridayCutoffHour);
      bool killzoneActive = (isFriday && isAfterCutoff);
      
      // 3. Spread Logic
      // Account for 3-digit (JPY) and 5-digit broker pricing structures
      int digits = (int)SymbolInfoInteger(_Symbol, SYMBOL_DIGITS);
      double pipMultiplier = (digits == 3 || digits == 5) ? 10.0 : 1.0;
      
      double currentSpreadPoints = (double)SymbolInfoInteger(_Symbol, SYMBOL_SPREAD);
      double currentSpreadPips = currentSpreadPoints / pipMultiplier;
      
      bool spreadExceeded = (currentSpreadPips > MaxSpreadPips);
      
      // 4. Execution Logging
      if(spreadExceeded && !killzoneActive)
        {
            LogSkippedTrade("Spread Cap Exceeded", currentSpreadPips);
            lastBarTime = currentBarTime; 
        }
      else if(killzoneActive)
        {
            LogSkippedTrade("Friday Cutoff Time Reached", currentSpreadPips);
            lastBarTime = currentBarTime; 
        }
  }

//+------------------------------------------------------------------+
//| Appends skipped trade events directly to a local CSV file        |
//+------------------------------------------------------------------+
void LogSkippedTrade(string reason, double spreadPips)
  {
      string fileName = "SkippedTradesLog.csv";
      
      // Open file for appending (FILE_READ | FILE_WRITE)
      int fileHandle = FileOpen(fileName, FILE_WRITE | FILE_READ | FILE_CSV | FILE_ANSI, ',');
      
      if(fileHandle != INVALID_HANDLE)
        {
            // If the file is completely new, write the header row first
            if(FileSize(fileHandle) == 0)
              {
                  FileWrite(fileHandle, "Time", "Symbol", "Action", "Reason", "SpreadPips", "Price");
              }
            
            // Move pointer to the end to prevent overwriting existing logs
            FileSeek(fileHandle, 0, SEEK_END);
            
            double askPrice = SymbolInfoDouble(_Symbol, SYMBOL_ASK);
            
            // Append the data row
            FileWrite(fileHandle, 
                      TimeToString(TimeCurrent()), 
                      _Symbol, 
                      "SKIP", 
                      reason, 
                      DoubleToString(spreadPips, 1), 
                      DoubleToString(askPrice, (int)SymbolInfoInteger(_Symbol, SYMBOL_DIGITS)));
                      
            FileClose(fileHandle);
            Print("Logged Skip: ", reason, " | Spread: ", DoubleToString(spreadPips, 1));
        }
      else
        {
            Print("Failed to open CSV for logging! Error: ", GetLastError());
        }
  }
FTtrader
Posts: 567
Joined: Mon Aug 03, 2026 2:43 pm

Re: Avoiding EURJPY during Friday afternoon when spreads exceed my filter

Post by FTtrader »

How to Access Your Data

1.) Attach the EA to your EURJPY chart.

2.) Whenever a bar closes and triggers either the spread cap or the time cap, the EA will write a row to the log and print a confirmation to the terminal's Experts tab.

3.) To view your deal log, go to File > Open Data Folder in your terminal.

4.) Navigate to MQL4\Files (or MQL5\Files). You will find SkippedTradesLog.csv waiting there, formatted cleanly for Excel or automated backtesting imports.
Post Reply