Day Trading Strategies on TradingView

Day trading strategies open and close positions within a defined trading session. Trend continuation follows an established direction, range reversion trades back toward a reference, and breakout trading enters beyond a fixed boundary. Compare them under the same session, position-risk budget and cost assumptions before choosing a rule to test.

Create a Pine Script strategy

Key Takeaways

  • Choose a setup using information available before entry. A day cannot be labeled a trend day from its eventual closing price.
  • Keep the market, session, timeframe, costs and risk budget fixed when comparing strategies.
  • Specify the last entry time and a scheduled flattening time before the session ends.
  • The best day trading strategies in a historical sample may fail in the next one. Reserve unseen data before tuning.

Choose the price behavior you want to test

These three families ask different questions. The selection matrix describes hypotheses, not proven advantages. Start with one family and record its eligibility rule before the signal. If several families run together, define which takes priority and whether they share one position limit.

Day trading strategy selection matrix
FamilyObservable conditionEntry ideaMain failure
Trend continuationPrice is above a rising reference; a pullback has not broken the chosen loss boundary.Enter when the pullback recovers in the trend direction.A late trend signal buys a reversal, or a flat market produces repeated losses.
Range reversionPrice returns inside a previously fixed range after testing its edge.Enter toward the range midpoint, with a separate protective stop.A new directional move continues beyond the range instead of returning.
BreakoutA confirmed close crosses a boundary calculated from completed bars.Enter in the break direction and define when the break has failed.The close outside the range is followed by a return inside it.

Use one session and execution contract

For an illustrative comparison, use one liquid instrument, standard five-minute candles and a 09:30 to 16:00 America/New_York test session on full trading days. These hours are an experiment choice, not a schedule for every asset. Exclude early-close days from this baseline or define their shorter schedule separately. Keep the chart data session fixed, because including overnight bars changes moving averages.

  • Allow entry signals from 10:00 until before 15:30. Request a market flatten at the 15:50 bar close, cancel pending entry orders, and prohibit further entries that day. Verify the actual exit fill remains inside the session.
  • Evaluate signals on completed bars. TradingView normally fills new market orders on the next available tick, usually the next bar open. Preserve this setting across all three tests.
  • Use an explicit session timezone. Pine session functions default to the exchange timezone, which may differ from the chart display timezone.
  • Allow one open position and no additions. Fix the cash-risk budget and a maximum position value before testing; stop accepting entries after two completed losing trades that session.
  • Record commission, spread assumptions and slippage separately. Use the same values in every comparison and include a second run with higher execution costs.

Three illustrative long-only rule sets

The following numbers are starting assumptions with no reported performance. Test each row independently. For every entry, use the completed signal bar's 14-bar ATR as a frozen stop distance from the actual fill; skip missing or nonpositive values. Size from cash risk / (frozen ATR distance × instrument point value), with currency conversion where needed, then round down to the permitted quantity increment. Skip a zero quantity or a position above the value cap. Stops can lose more than the intended risk after gaps or slippage.

Entry, exit and invalidation specifications
FamilyCompleted-bar entry signalExit and reset
Trend continuationThe 20-bar EMA is above its value five bars ago. The previous close was at or below its EMA; the current close crosses above the current EMA.Protective stop at one frozen ATR below the fill; target at two frozen ATR above it. After exit, require a fresh crossing signal.
Range reversionFreeze the high and low of the six bars from 09:30 to 10:00. A later bar trades below the low, then closes back above it but below the frozen midpoint.Use the shared protective stop. Request a market exit on a close at or above the midpoint or below the range low. Require a new below-low test before re-entry.
BreakoutUse the same frozen opening range. The current close is above its high and the previous close was at or below that high.Use the shared protective stop and a two-ATR target. Also request a market exit after a close back below the range high. Require a fresh crossing before re-entry.
  • The scheduled 15:50 flatten overrides all three holding rules. Protective stops remain active until the position is closed; cancel remaining exit orders afterward.
  • Do not move the opening-range boundaries later in the day. Recalculating them after entry would change the experiment.
  • Review bars containing both a stop and a target. The broker emulator infers intrabar movement from available data; the favorable order of events is not assured.
  • Short trades require a separate specification and any relevant borrowing or funding costs. These long-only examples do not establish symmetry.

Keep failed setups in the comparison

A rule can trigger exactly as written and still lose. The following hypothetical paths illustrate failures without claiming historical frequency. Keep these trades in the record instead of adding a filter after each loss.

Illustrative failure samples, with prices in arbitrary units
SetupObserved pathWhat the test must retain
Trend pullbackEntry fills at 100 with a frozen ATR of 1. Price then reaches the stop at 99 before the target at 102.A valid rising EMA did not prevent a reversal. Record the actual stop fill and costs.
Range reversionFrozen range is 99 to 101. A bar trades to 98.8 and closes at 99.2; entry fills at 99.3. Price then closes at 98.9.The close below 99 requests an exit. The next available fill can be lower than 98.9.
BreakoutThe range high is 101. Price closes at 101.2, entry fills at 101.3, and the next close is 100.8.The false-break exit applies even if a later recovery would make holding look better.

Small gross edges can disappear after costs

Suppose an illustrative 100-trade sample has 45 winners averaging 1.5R and 55 losers averaging 1R, where R is the planned initial price risk. Gross expectancy is 0.45 × 1.5R − 0.55 × 1R = 0.125R per trade. If total round-trip costs average 0.15R, net expectancy is −0.025R. This arithmetic is not a backtest result. It shows why win rate or gross profit alone cannot select an intraday strategy.

  • TradingView supports commission settings and fixed-tick slippage. A constant slippage assumption cannot reproduce every change in liquidity.
  • Avoid counting the same spread allowance twice if it is already included in the modeled fill adjustment.
  • A simulated fill at the final session close does not prove an alert-driven live order can fill there. TradingView warns that an order sent after the last bar closes may wait until the next session.

Compare unchanged rules on unseen sessions

Separate a development period from a later evaluation period before selecting inputs. Compare net expectancy, drawdown, trade count, average holding time and results by session. Inspect whether a small number of days account for most profits, and whether nearby parameter values produce materially different behavior. Do not keep tuning against the same evaluation period and still call it unseen.

  • Keep rejected variants in a research log. Trying many settings increases the chance of selecting a favorable accident.
  • For day to day trading strategies, carry the same definitions across sessions and reset only the state the rules specify, such as the opening range and daily loss count.
  • Forward-test the selected definition and compare signal times, order times and fills against the historical model. Record changes as a new strategy version.

Turn one rule set into a Pineify workflow

Pine Script AI Coding Agent can draft a TradingView strategy from the session, entry, exit and sizing specification. Visual Pine Script Editor provides a rule-block workflow where the required blocks are available; custom session and reset logic may need code. After reviewing the strategy, use Strategy Optimizer to compare bounded input ranges while keeping costs and evaluation dates fixed. Check product access at each destination. This guide does not run a scanner or execute trades.

Pineify next step

Build one day trading strategy from explicit rules

Give AI Coding Agent the setup, session, entry cutoff, flattening time, cost model and loss limits together. Review the generated strategy before comparing a small parameter range in Strategy Optimizer.

This page is educational and does not provide investment advice. All numerical setups and trade paths are hypothetical, with no reported performance. Day trading can cause rapid losses. Stops, historical backtests and simulations do not guarantee future results or limit every loss to its planned amount.

Frequently Asked Questions