Pine Script Daily Profit Cap for Apex Consistency Rule
Stops new entries once session profit hits a configurable cap. Essential for Apex PA accounts — one outsized day can delay a payout request under the 50% consistency rule.
//@version=5
strategy("Daily Profit Cap", overlay=true)
// ── Inputs ──────────────────────────────────────────────
dailyProfitCap = input.float(800.0, "Daily Profit Cap ($)", step=50,
tooltip="Stop new entries once session profit hits this level. For Apex PA: keep it below the 50% consistency threshold.")
// ── State ────────────────────────────────────────────────
var float sessionProfit = 0.0
var bool capReached = false
if session.isfirstbar_regular
sessionProfit := 0.0
capReached := false
if strategy.closedtrades > strategy.closedtrades[1]
sessionProfit += strategy.closedtrades.profit(strategy.closedtrades - 1)
if sessionProfit >= dailyProfitCap
capReached := true
// ── Entry logic ──────────────────────────────────────────
longCondition = ta.crossover(ta.ema(close, 9), ta.ema(close, 21)) and not capReached
if longCondition
strategy.entry("Long", strategy.long)
strategy.exit("Exit", "Long", profit=20, loss=10)
// Visual
bgcolor(capReached ? color.new(color.green, 90) : na, title="Daily Cap Reached")
When you need this
The Apex consistency rule — also called the 50% rule — applies to funded PA (Performer Account) holders. When you request a payout, Apex checks whether any single trading day accounts for more than 50% of your total accumulated profit since your last payout. If it does, the payout may be delayed or denied until you trade your account to a more consistent distribution of gains.
For automated strategies this is a real risk. A strategy can have one exceptional session — a gap fill day, a major news event, a trend day — where it captures far more profit than a typical session. Without a daily cap, that one day can put your consistency ratio offside and complicate your payout.
This snippet mirrors the kill switch logic but in the opposite direction: instead of tracking losses, it tracks profits and blocks new entries once the daily target is met.
How to set the cap
Set dailyProfitCap to approximately 35% of your current accumulated profit. This keeps any single day below the 50% threshold with a practical buffer even if the exact calculation differs slightly between your Pine Script tracking and Apex's internal system.
| Apex PA Account | Typical Profit Target | Recommended Daily Cap |
|---|---|---|
| Apex 25k PA | $1,500 | $375 |
| Apex 50k PA | $3,000 | $750 |
| Apex 100k PA | $6,000 | $1,500 |
| Apex 150k PA | $9,000 | $2,250 |
| Apex 300k PA | $20,000 | $5,000 |
Frequently Asked Questions
What is the Apex consistency rule?
The Apex consistency rule — sometimes called the 50% rule — applies to Apex PA (Performer Account) funded accounts. It requires that no single trading day account for more than 50% of your total accumulated profit since your last payout. If one day's profit exceeds 50% of the total, Apex may require you to continue trading before approving the withdrawal. A daily profit cap in your Pine Script strategy prevents outsized single-day results that would trigger this rule.
Does this apply during the Apex evaluation phase?
No. The Apex consistency rule only applies to funded PA accounts, not to evaluation accounts. During your eval you want to hit the profit target as efficiently as possible — capping daily gains would work against you. Only activate this snippet once you are trading a funded PA account.
How do I calculate the right daily cap for my account?
A safe approach is to keep the daily profit cap below 50% of your accumulated profit. For a $3,000 starting target on a 50k PA account, a $750 cap is a conservative starting point, but the correct limit should be recalculated as total profit grows. Verify the current Apex payout terms before relying on any fixed cap.
Related
Want a complete Apex-ready strategy with the profit cap built in?
Our scripts include the daily profit cap, kill switch, session filter, and EOD flatten — pre-wired and tested on 3 years of MES/NQ data. Invite-only on TradingView, from $24/mo.
View Plans — From $24/mo