Strategy · Pine Script v5 · On the chart

200MA Composite Short-Term Strategy with Dashboard

by and3330

A long-only strategy with a 200-period moving average as the main trend line, coloured by its direction.

View on GitHub

GitHub stars1on the repository
Pine versionv5runs as is
Lines of code181
Settings14inputs
LicenceNone stated
Last update4 months ago24 Jun 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  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

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

Entries come from a cross above that average, a bounce near it, or a short-term setup needing an EMA stack, a Bollinger upper band breakout and a volume spike. Exits use fixed percentage stop loss and take profit values, with an optional ATR-based version. The average, EMAs and bands plot on the price chart with a summary dashboard table.

Details

Published by

and3330 on GitHub

Type

Strategy, Pine Script v5

Draws

On the price chart

Category

Trend, Moving averages, Screeners & dashboards

Markets

Any symbol

Timeframes

M15-H1

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
大局均線週期int200maLength
均線方向檢查波段int5maLookback
支撐阻力感應範圍 (%)float1.5bufferPercent
EMA 10 快線int10ema10Len
EMA 50 中線int50ema50Len
布林通道長度int20bbLength
布林通道標準差float2.0bbMult
成交量均線長度int20volMaLen
啟用 ATR 動態止損/止盈booltrueenableATR
ATR 週期int14atrLength
固定停損百分比 (%)float1.5stopLossPct
固定停利百分比 (%)float3.0takeProfitPct
Show all 14 settings
SettingTypeDefaultVariable
顯示右上角綜合評估表booltrueshowDashboard
顯示均線與布林通道booltrueshowLines
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

AC- MY SCRIPT1

by hasnocool
106 stars

This strategy plots an Optimized Trend Tracker and a selectable moving-average support line on the price chart. It builds the average as SMA, EMA, WMA, TMA, VAR, WWMA, ZLEMA, or TSF, then offsets long and short stops by a percent of that average. Optional mark

Strategy v5 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of AC- MY SCRIPT1

Calculates a custom moving average (MaMA) by modifying the source price with price momentum, acceleration, and psychological win-rate probability before applying an EMA or SMA. Plots the adjusted moving average directly on the price chart alongside optional re

Strategy v5 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of Momentum Adjusted Moving Average by DGT

This long-only trend-following strategy combines Ichimoku Kinko Hyo components with higher timeframe moving average filters. It triggers long entries when price trades above a higher timeframe EMA and a bullish Tenkan-Sen cross above Kijun-Sen occurs under fav

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · MPL-2.0 GitHub repository of Ichimoku Kinko Hyo Momentum Strategy
4 stars

This strategy plots a fast and a slow simple moving average on the price chart and trades long only. It enters when the fast average crosses above the slow average and closes the position when the fast average crosses back below. There is no stop loss or take

Strategy v6 TrendMoving averages
Updated 2 weeks ago · MIT GitHub repository of SMA cross + TokIO check

This strategy calculates trend direction across three user-defined higher timeframes using dual Simple Moving Averages, filtered by On-Balance Volume and Commodity Channel Index conditions alongside fractal pivot swings. Entries trigger when multi-timeframe tr

Strategy v5 TrendMoving averages Repaints
Updated 5 months ago · None stated GitHub repository of Fractals with Pivot Trendlines Strategy

CTC Comet Strategy 7.2024.1

by wynnforthework
2 stars

This strategy executes trades based on dual exponential moving average trend alignment, customizable Bollinger Bands, and normalized ATR volatility thresholds. It enters positions in the direction of the moving average trend and manages risk using a dynamic st

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of CTC Comet Strategy 7.2024.1

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