Pine Script Daily Profit Cap for Apex's Consistency Rule

Stops new entries once session profit hits a configurable cap — the guardrail an Apex funded account needs so one outsized day can't derail a payout request.

Pine Script v5 Free · TradingView free plan
Pine Script
//@version=5
strategy("Target Filled - Daily Profit Cap Example", overlay=true)

// --- Inputs ---------------------------------------------------
profitCap = input.float(750.0, "Daily Profit Cap ($)", step=50,
     tooltip="New entries stop once session profit hits this level. For an Apex PA: roughly 25% of the profit target.")

// --- State ------------------------------------------------------
var float pnlToday = 0.0
var bool  capped   = false

if session.isfirstbar_regular
    pnlToday := 0.0
    capped   := false

if strategy.closedtrades > strategy.closedtrades[1]
    pnlToday += strategy.closedtrades.profit(strategy.closedtrades - 1)

if pnlToday >= profitCap
    capped := true

// --- Sample signal — replace with your own entry logic ---------
fastMA = ta.ema(close, 9)
slowMA = ta.ema(close, 21)
canLong = ta.crossover(fastMA, slowMA) and not capped

if canLong
    strategy.entry("Long", strategy.long)
    strategy.exit("Exit", "Long", profit=20, loss=10)

// Visual: green background confirms the cap has been reached
bgcolor(capped ? color.new(color.green, 90) : na, title="Daily Cap Reached")

When you need this

Apex's consistency rule checks, at the point of a payout request, whether any single trading day made up too large a share of a funded account's total profit. On the legacy Performance Account that ceiling is 30%; on the newer EOD and Intraday Trailing Drawdown lines it's a more relaxed 50%, measured at payout time instead.

An automated strategy is exactly the kind of thing that can trip this without meaning to. One unusually strong session — a gap, a trend day, a scheduled news reaction — can produce far more than a typical day's result, and without a cap that single session can end up dominating the profit distribution Apex sees at payout.

This snippet is the mirror image of the daily kill switch: instead of watching for losses, it watches for profit and stops opening new trades once the day's gain reaches the configured cap.

How to set the cap

Setting profitCap to roughly 25% of the account's total profit target keeps any single day comfortably under both the legacy 30% figure and the newer 50% one, with room to spare for any small differences between what your script tracks and what Apex calculates internally.

Apex AccountProfit TargetSuggested Daily Cap (~25%)
25k PA $1,500 $375
50k PA $3,000 $750
100k PA $6,000 $1,500
150k PA $9,000 $2,250
300k PA $20,000 $5,000
Confirm current numbers with Apex directly. Profit targets and the consistency rule's exact percentage have changed before (most recently in March 2026) and can change again. The 25%-of-target figure is a buffer, not a guarantee — check which product line (legacy PA vs. EOD/Intraday Trailing Drawdown) an account falls under before relying on it.

Frequently Asked Questions

What is the Apex consistency rule?
It's a cap on how much of your total funded-account profit can come from a single day. On the legacy Performance Account the limit is 30% — no session can account for more than 30% of total PA profit at the time of a payout request, or the payout can be delayed until the distribution evens out. Apex's newer EOD and Intraday Trailing Drawdown product lines (introduced in the March 2026 rule change) use a looser 50% cap measured at payout instead. A script-level daily profit cap keeps a single outsized day from tripping either version.
Does the daily profit cap apply during the Apex evaluation?
No. The consistency rule only applies once an account is funded — it plays no part during the evaluation phase. During the eval the goal is reaching the profit target as fast as reasonably possible, so capping daily gains there would only slow that down. Turn this snippet on after the account converts to a funded Performance Account.
How do I calculate the right daily cap for my account?
A safe rule of thumb is capping each day at about 25% of the total profit target, which sits comfortably under both the legacy 30% figure and the newer 50% one. On a $3,000 target that works out to roughly $750 a day. Trim the cap lower if you want extra margin for calculation differences, or raise it slightly if you'd rather clear the target in fewer sessions.

Get a Pine Script tuned to your prop firm.

Invite-only on TradingView within 24 hours. From $19/mo, cancel anytime.