OPEN-SOURCE SCRIPT

Pyramid Enter

123
Pyramid Enter — Educational Position-Scaling Study

Purpose
Pyramid Enter is a lightweight, educational visualization of additive entries (“pyramiding into strength”). It’s designed to help you study how layered entries might line up during persistent trends. This script does not execute orders, make predictions, or provide financial advice. It simply shows where entry candidates could appear under a simple crossover framework with an optional trend filter.

How it works (concept)

Computes a fast EMA of your chosen Source (default: close).

Applies a user-selected Smoother (SMA/EMA/RMA/WMA/None) to create a slower reference line.

Marks an Enter candidate when the fast EMA crosses above the smoothed line.

Optional EMA 8/21 trend filter can be enabled to allow marks only when EMA(8) > EMA(21).

Includes an adaptive-on-flip option: if the 8/21 filter turns on, a one-time Enter candidate is allowed (useful for studying “first add after trend resumes”).

This is strictly a visual study of where entries might layer during momentum continuation — exits, risk, and sizing are intentionally out of scope so you can analyze those topics separately.

Inputs

Inputs

Length: Period of the fast EMA applied to Source.

Source: Price series used for the fast EMA.

Offset: Visual offset only; no effect on logic.

Smoothing

Type: Choose “SMA / EMA / RMA / WMA / None” for the reference line.

Length: Period for the smoothing type above.

Visualization

Show Labels: Toggle the on-chart Enter labels.

EMA 8/21 Filter

Enable EMA 8/21 Filter: Only mark when EMA(8) > EMA(21).

Fast EMA / Slow EMA: Lengths for the filter (defaults 8/21).

Plot Filter EMAs: Display the 8/21 lines for context.

Adaptive entry when filter flips ON: Allows a one-time Enter candidate on the bar the trend filter turns on (handy when studying re-acceleration after a pullback).

Visuals

White line: Fast EMA of Source.

Blue line: Selected smoother (your slower reference).

Labels: “Pyramid Enter” markers at candidate spots (intrabar + bar-close confirmation are handled internally to keep charts tidy).

No alerts are included. This tool is for chart study only.

Suggested study workflow

Context first — Add your higher-timeframe tools or moving averages to understand the broader regime.

Enable the 8/21 filter if you want to restrict labels to uptrends only.

Experiment with the smoother — SMA is simple, but EMA/RMA/WMA can change sensitivity.

Review clusters of “Pyramid Enter” labels during strong trends to learn where scaling could be considered in a rules-based process.

Pair with your risk framework — Because this script intentionally omits exits/position sizing, use it alongside your own stop, trailing, and de-risking logic for research.

Good citizens of the chart

No repainting tricks.

Marks follow standard EMA/smoothing crossovers with a simple state lock to avoid duplicates.

Designed to be lightweight and readable on any timeframe or symbol.

Limitations & notes

This is not a signal provider, trading system, or performance model.

Labels are educational candidates only; they do not imply profitability or suitability.

Past chart behavior does not guarantee future results. Always do your own research and practice risk management.

Compatibility

Works on all symbols/timeframes supported by TradingView.

Overlay: true (prints on price chart).

No alerts included by design.

Changelog

v1.0 — Initial public release: minimal visual study, optional 8/21 filter, adaptive flip option, no alerts.

License

Michael Culpepper Gratitude License — Free to use and modify for education and research. Please credit the author if you remix or share. Not for sale. No warranty.

Tags / Category (suggested)

Category: Trend Analysis / Educational Tools

Tags: pyramid, scaling, trend, ema, crossover, education, study

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.