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 invalidate a payout request under the 30% 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: set to ~25% of profit target.")
// ── 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 30% rule — applies to funded PA (Performer Account) holders. When you request a payout, Apex checks whether any single trading day accounts for more than 30% of your total account profit. 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 25% of your total profit target. This keeps any single day well below the 30% threshold 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 30% rule — applies to Apex PA (Performer Account) funded accounts. It requires that no single trading day account for more than 30% of your total account profit at the time of a payout request. If one day's profit exceeds 30% 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 set the daily profit cap at 25% of your total profit target. For a $3,000 total profit target on a 50k PA account, that means capping each day at $750. This gives you a buffer below the 30% threshold to account for any calculation differences. Adjust upward slightly if you prefer fewer trading days, or downward for more conservative compliance.
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. Instant delivery from $50.
View Plans — From $50