Scalping trading strategy: test the rules and execution costs
A scalping trading strategy seeks small price moves with short holding periods and repeated entries. A test needs more than a signal: define the entry clock, stop, target, maximum holding time, position size, and cost per round trip. A few ticks of friction can consume the entire average gain. The example below is a research specification, with no claimed performance.
Specify one complete one-minute rule
Use the following long-only breakout as a fixed baseline. Before testing, record one exact US equity symbol and data feed, the date range, and whether prices are adjusted. The arithmetic assumes a $0.01 tick and 100 shares; verify the chosen instrument supports those assumptions. These parameters are illustrative, not optimized settings or a recommendation.
| Decision | Rule |
|---|---|
| Data and session | Use regular-session bars and America/New_York time. Start each session flat. Require five completed bars from that session. |
| Entry signal | While flat, enter only when a completed close exceeds the highest high of the preceding five bars, excluding the signal bar. Eligible signal close times are 09:35 through 11:25 inclusive. |
| Entry order | Submit a market buy after the signal closes. Model the fill at the next available tick, normally the following bar open. One position only; no pyramiding or short entries. |
| Protective exits | Submit an attached bracket with the entry: stop 10 ticks below the actual entry fill and limit target 15 ticks above it. The first filled exit cancels the other. Do not wait until the entry bar closes to create protection. |
| Holding time | Count the entry bar as bar one. If still open at the fifth bar close, request a market exit for the next available tick. At the 11:29 bar close, request an exit for the 11:30 open if still holding. |
| Risk and frequency | Use $25,000 starting equity, 100 shares, and no leverage. Allow at most 10 entries per session and one full flat bar after each exit. Reject a trade if its estimated stop loss plus costs exceeds $25 or cash cannot fund it. |
Check the order clock before the result
TradingView documents next-tick fills for default market orders. For a signal on the 10:00 to 10:01 bar, the entry is therefore at the 10:01 open. Five held bars finish at 10:06; a time exit requested then fills on the next available tick, normally the 10:06 open. Missing bars or a halt can delay that exit, so five minutes is a model assumption, not a guaranteed holding limit.
- With a hypothetical $100.00 entry fill, the bracket is $99.90 stop and $100.15 target. A worse entry changes both levels because they are measured from the actual fill.
- If both levels lie inside one historical candle, OHLC alone does not reveal which was reached first. The emulator assumes a price path; inspect the trade with lower-timeframe data.
- Keep intrabar recalculation and same-close fills disabled for this baseline. Record any changes to those settings as a different experiment.
- A stop is a trigger, not a guaranteed maximum loss. A gap through $99.90 can produce an exit below it.
Calculate the cost budget in ticks
For an arithmetic-only scenario, suppose 60% of trades win 15 ticks and 40% lose 10 ticks before friction. Gross expectancy is 0.60 × 15 - 0.40 × 10 = 5 ticks per share. The table holds those outcomes constant to isolate costs; it is not a backtest of the rule above. Time exits would create other outcomes and require the actual average win and loss.
| Cost case | Commission + spread + slippage | Net expectancy | Break-even win rate |
|---|---|---|---|
| Frictionless reference | 0 + 0 + 0 = 0 ticks | 5 ticks; $5 per 100 shares | 40% |
| Base cost assumption | 1 + 1 + 2 = 4 ticks | 1 tick; $1 per 100 shares | 56% |
| Wider spread | 1 + 3 + 2 = 6 ticks | -1 tick; -$1 per 100 shares | 64% |
| Worse slippage | 1 + 1 + 4 = 6 ticks | -1 tick; -$1 per 100 shares | 64% |
| Higher commission | 3 + 1 + 2 = 6 ticks | -1 tick; -$1 per 100 shares | 64% |
- For a constant cost c in ticks, net expectancy = win rate × 15 - loss rate × 10 - c. Break-even win rate = (10 + c) / (15 + 10).
- The base case assumes $0.005 commission per share on each side, a $0.01 full spread paid once per round trip relative to midprice, and $0.01 additional slippage on each side. These are invented test inputs, not broker quotes.
- At 100 shares, the planned $10 stop loss plus $4 base costs is $14, below the example $25 risk cap. A larger gap, partial fill, or delayed exit can exceed that estimate.
Map the costs to TradingView without counting them twice
Strategy Properties applies commission at entry and exit. Slippage is entered in ticks and affects market and stop orders; it does not apply the same adjustment to a limit target. A fixed slippage setting can approximate spread costs but cannot reconstruct changing bid and ask quotes. Keep a written mapping between your broker charges, spread assumption, and strategy settings.
- The arithmetic table starts from frictionless prices. If a trade export already uses fills affected by spread or slippage, do not subtract that same cost again.
- Rerun the strategy for each execution scenario. Adjusted fills can change which exit happens and the win rate, so subtracting a fixed fee from an unchanged trade list is only a first sensitivity check.
- Use Verify Price For Limit Orders to test a stricter target-fill assumption. Touching a target in historical OHLC does not prove your order had queue priority or sufficient liquidity.
- Record per-order minimum commissions and exchange charges if they apply. A per-share approximation can understate the cost of small orders.
Audit ambiguous fills and chart construction
Bar Magnifier uses lower-timeframe prices to refine historical fills. Compare trades that touch both stop and target, and record whether intrabar coverage exists for the tested dates. TradingView limits lower-timeframe requests to 200,000 bars, so early trades may lack that detail. More detailed bars still do not establish order-book depth, latency, or your position in a limit-order queue.
- Use standard candles for the main execution test. TradingView warns that Renko brick prices are synthetic and can create fills that were unavailable in the market.
- If the idea uses Renko signals, specify the brick construction separately and investigate execution using standard price data. A smoother brick chart is not evidence of executable profit.
- Flag every bar whose stop/target order is ambiguous. If plausible fill sequences change the conclusion, report the result as unresolved.
Freeze the rule and test what would invalidate it
Select the symbol, dates, session, and cost assumptions before examining results. Use an earlier period to develop the rule, then freeze it for a later untouched period. Retain losing days and all eligible signals. An attractive result that disappears with two additional ticks of round-trip friction is too cost-sensitive to support the original conclusion.
- Compare net expectancy per trade, trade count, drawdown, and holding duration across base and stressed costs. Check time exits separately from stop and target exits.
- Review daily concentration: one unusual session should not be mistaken for repeatable behavior across the sample.
- Forward-test the frozen rule and log signal time, submission time, quoted spread, and observed fills. Compare those observations with the assumptions before considering real capital.
- Reject claims of a best scalping strategy based only on win rate. The payoff ratio, costs, sample, and fill model determine what that number means.
Where Pineify fits
Give Pine Script AI Coding Agent the rule table, session timezone, attached bracket requirement, and exact fill settings to draft a strategy you can inspect in TradingView. Configure costs there, then export the trade-list CSV to Backtest Deep Report to examine the recorded net results. The report consumes trade outcomes, not arbitrary OHLC files, and does not reconstruct broker execution.
Educational strategy research, not investment advice. All parameters, costs, and win rates on this page are hypothetical. Stops and time limits cannot guarantee a fill or cap losses during gaps and halts. Backtests do not establish future profitability.