Strategy · Pine Script v6 · Own pane

ES point-value 9/21 SMA cross

by pineforge-4pass· code credited to PineForge contributors 2026

This strategy isolates ES futures point-value PnL scaling using a nine-period and twenty-one-period simple moving average cross.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code36
Settings0inputs
LicenceApache-2.0
Last update5 days ago23 Oct 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.

Source Code

36 lines of Pine Script v6 from special-validation/futures/symbol-futures-pointvalue-es-01/strategy.pine, published under Apache-2.0. Keep the author's credit and licence lines when you reuse it.

strategy.pine
// This Pine Script® code is licensed under Apache-2.0
// SPDX-License-Identifier: Apache-2.0
// © PineForge contributors 2026
//
// Parity probe: ES futures point-value PnL multiplier + 0.25-tick snap.
//
// Purpose: Isolate the per-instrument PnL scaling on a real CME futures
// contract. CME_MINI:ES1! has syminfo.pointvalue = 50 (USD per index
// point per contract) and syminfo.mintick = 0.25. With 1-contract fixed
// sizing, cash_per_contract commission ($2.10/contract) and slippage=1
// tick, every closed trade's gross PnL must equal
// (exit_px - entry_px) * 50 and fills must snap to 0.25 boundaries.
// Plain SMA(9)/SMA(21) cross drives flat-to-long/long-to-flat so the
// trade set is deterministic and the PnL multiplier is the only moving
// part vs. the default crypto (pointvalue=1, mintick=0.01) behaviour.

//@version=6
strategy("ES point-value 9/21 SMA cross",
     initial_capital=1000000,
     currency=currency.USD,
     commission_type=strategy.commission.cash_per_contract,
     commission_value=2.10,
     slippage=1,
     default_qty_type=strategy.fixed,
     default_qty_value=1,
     pyramiding=1,
     process_orders_on_close=false)

fast = ta.sma(close, 9)
slow = ta.sma(close, 21)

if ta.crossover(fast, slow)
    strategy.entry("L", strategy.long)

if ta.crossunder(fast, slow)
    strategy.close("L")

Overview

ES point-value 9/21 SMA cross enters one long contract when the fast average crosses above the slow average and closes that long when the fast average crosses back below. Commission is cash per contract and slippage is one tick. There is no stop loss or take profit. The script declares no user inputs. It runs as a strategy in a separate pane.

Details

Published by

pineforge-4pass on GitHub

Code credit

PineForge contributors 2026, as written in the script's header

Type

Strategy, Pine Script v6

Draws

Separate pane below the chart

Category

Trend, Moving averages

Markets

Indices

Timeframes

Any timeframe

Risk Notes

  • The strategy enters trades without a stop loss

Topics

algorithmic-tradingbacktestingparitypine-scriptpinescriptquantitative-financetest-corpustradingview

Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

330 stars

HA UnivLong&Short Futures calculates Heikin Ashi candles and builds a channel using simple moving averages of Heikin Ashi highs and lows. It enters long positions when the upper channel line crosses above the lower channel line and opens short positions on the

Strategy v5 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of HA UnivLong&Short Futures

MACD Crossover (tutorial)

by pineforge-4pass
193 stars

This strategy calculates the Moving Average Convergence Divergence indicator and plots the MACD line, signal line, and histogram in a separate pane. It enters long positions when the MACD line crosses above the signal line and enters short positions when it cr

Strategy v6 Oscillators & momentumMoving averages
Updated today · Apache-2.0 GitHub repository of MACD Crossover (tutorial)

8 Whittle Down

by hasnocool
106 stars

This strategy executes short positions during the end-of-day session (14:29–15:00) when the price is below the 200-day simple moving average. If price moves higher against the initial short trade, it scales into the position by submitting a second short order

Strategy v4 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of 8 Whittle Down

EMA Ribbon MACD

by iamrichardD
57 stars

This strategy combines an EMA ribbon with MACD confirmation and plots in a separate pane. It enters when ribbon alignment, optional MACD zero or signal crosses, volume, smart-money, and multi-timeframe filters agree, then exits with percentage stop loss and ta

Strategy v6 TrendMoving averages
Updated 1 year ago · Apache-2.0 GitHub repository of EMA Ribbon MACD

More strategys

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers