A strategy built on a smart money concepts toolkit that draws internal and external market structure with break of structure and change of character labels, swing order blocks, fair value gaps, previous day and 4-hour highs and lows, and automatic Fibonacci le
A Pine v6 strategy on the price chart that applies a range filter to smooth price and detect direction, optionally on Heikin Ashi candles, with sampling period and multiplier settings. It also draws pivot-based support and resistance levels. Trades can be limi
This strategy executes long entries during a user-defined backtest time window. It calculates a 1-period Exponential Moving Average (EMA) and enters long trades automatically within the specified dates. Positions exit when the calculated EMA exceeds the positi
ArminOscillator Strategy is a strategy that applies a stochastic calculation to a long RSI, then smooths it into K and D lines. A long entry occurs when K crosses above D below 20 with price above a short SMA, or in a sideways case; a short entry mirrors this
The MACD #2 strategy plots two exponential moving averages with lengths 12 and 26 on the price chart. Buy signals trigger on the fast EMA crossing above the slow EMA when ATR(14) exceeds its prior value, entering a long position with one unit. The position clo
A long-only style strategy aimed at finding relative lows in stocks. It checks recent and one-year lows, RSI, the lower Bollinger band, volume against its average, a 200-period moving average bear test, MACD histogram turns, consecutive down days and drop from
A minimal strategy-type script for the price chart that draws a fast and a slow moving average, exponential or simple according to a toggle, and colours the lines and the area between them by the direction of the gap. Inputs set the source, the fast length at
A Pine strategy script that overlays three SuperTrend lines with different periods and multipliers, plus a 100-period EMA, and computes the same SuperTrends on a higher timeframe set in minutes. A slope of the third SuperTrend is plotted over a bar-count input
This strategy generates long signals on the price chart using EMA conditions and RSI levels. It enters long positions when the buy condition, based on EMA alignment checks over specified back bars, is satisfied. Exits occur at a stop loss calculated from the e
A long-only strategy based on a trailing stop approach, using a slow SMA, medium and fast EMAs, a pin bar test, and optional stochastic and money flow index filters that can read other timeframes. Exits use a trailing stop plus a hard stop expressed in pips. I
A strategy-type script for crypto that combines Bollinger Bands (22 periods, 1.62 deviations) with %B and an 18-period RSI. It looks for %B crossing back above zero together with RSI crossing back above 28 as one sequence, and %B falling below 1.33 together wi
This strategy plots two moving averages on the price chart and uses their relationship to bias long or short trades. Entries can be limited to one direction or allowed to reverse. Stops sit beyond a swing high or low by an ATR multiple, and a reward-to-risk li
A strategy that trades when price closes across a 50-period moving average after the previous close was on the other side. It also needs a Stochastic RSI condition on the chart timeframe, a limit on the stop distance in points, and agreement from a higher time
12/26-IT Strategy is a trend-following trading strategy that calculates 12 and 26 exponential moving averages alongside resistance levels and RSI bounds. It triggers long entries upon EMA crossovers, optionally filtered by resistance pivots and RSI ranges. The
This intraday strategy opens a long when the MACD histogram crosses above zero and a short when it crosses below, only inside a chosen session and only while ADX is below a threshold of 25. Each trade has a fixed point-based stop loss and take profit relative
A strategy that treats a low ADX, below 18 by default, as consolidation. It draws a box from the highest high and lowest low of the last 20 bars and enters when price crosses the box edge while ADX is low. The stop loss is half the box width and the profit tar
A strategy that applies a k-nearest-neighbours classifier to RSI, ROC, CCI or volume features to estimate the next move, then trades long and or short with an optional moving average filter and volatility filter. Each position uses an ATR-multiple stop loss, a
This strategy tracks trends by comparing higher-timeframe open and close prices fetched via security calls. When the higher-timeframe close crosses above the open, a buy signal triggers, and a cross below triggers a sell signal, plotted with chart labels and c
A very simple strategy that opens a long position when the close has fallen for six bars in a row, and closes it on the first bar that closes higher than the previous bar. It sizes each trade at all of the account equity and has no stop loss or take profit. Th
A multi-entry strategy combining a moving average cross, Bollinger Band touches and an optional SuperTrend confirmation. Extra orders can open when price reaches chosen outer bands, up to three entries in the same direction. Take-profit levels use standard dev
This strategy generates trading signals using simple moving average crossovers combined with closed trade results. It opens a long position when a 14-period simple moving average crosses above a 28-period simple moving average, and opens a short position when
Strategy that trades crossovers of a 7-period and a 25-period EMA, filtered by a 200-period EMA: longs when the fast line crosses above and the slow line is above the trend line, shorts in the opposite case. Stop loss uses an ATR multiple, with a risk-reward t
A strategy that scores MACD, on-balance volume, ADX and DMI conditions into a single value and trades on that value. Inputs set long entry and exit thresholds and short entry and exit thresholds, along with DMI and ADX lengths and signal levels. Long and short
X Trend is an overlay strategy that identifies trend direction and potential entry points using a custom X Trend trailing line, exponential moving averages, and Half Trend calculations. It includes optional Impulse MACD filtering designed to avoid ranging mark
A strategy that combines an Ichimoku-style cloud built from Donchian midpoints, MACD, a stochastic and ATR on the price chart. ATR-based stop loss and take profit multipliers, each defaulting to 1.0, set exit distances. A position side setting limits trading t
This overlay strategy combines a Bollinger-style band with separate ATR upper and lower envelopes and optional ADX, Volume Flow Indicator, and RSI filters. It sizes positions as a percentage of equity. Settings change band length and multiplier, ATR periods an
A strategy written for 15-minute charts that looks for pullbacks within an uptrend. It requires the 50 EMA above the 200 EMA, the close below the 50 EMA, a recent oversold reading on a smoothed Stochastic RSI, and a stochastic cross up that is higher than an e
A long-only strategy hard-coded to the BTCUSDT 5-minute series through a security request. It enters long when price crosses a 9-period simple moving average while RSI is below 50. It closes all positions when price is one percent above the average entry price
A strategy that uses a Fourier transform of recent prices, with a selectable lookback and three chosen sinusoid components, together with fast, medium and slow moving averages of selectable type, including EMA, ALMA and FRAMA. Optional linear regression smooth
This Pine v4 strategy trades Bitcoin perpetual futures on an hourly chart using candle spikes and volume. It goes short on a green candle with a large upper spike and goes long on a red candle with a large lower spike, when volume exceeds a threshold, the prio
This strategy template plots indicators directly on the price chart, including exponential moving averages, relative strength index, and average directional movement. It incorporates position management options such as account leverage, percentage-based positi
This script aggregates spot and perpetual futures price data across multiple cryptocurrency exchanges to calculate a volume-weighted futures premium index. It computes the log ratio between perpetual futures and spot prices, applies a user-selected moving aver
This Pine v4 strategy trades hammer and shooting star candles on the price chart. Entry candles can be filtered by size relative to ATR and by an optional EMA, and a Fibonacci level defines how far into the candle the close must be. Stop loss is an ATR multipl
This strategy draws a Donchian channel with a very long default period of 1440 bars, its midline and a 250-period simple moving average. It places limit orders to sell at the upper band after a high touches it and to buy at the lower band after a low touches i
This trend-following strategy overlays fast and slow Hull Moving Averages, Parabolic SAR, Chaikin Money Flow, a Volume Oscillator, and Heikin Ashi candle confirmation on the main price chart. Long entries occur when price and fast HMA are above the slow HMA, S
This strategy builds trades from two configurable moving averages, each selectable from eleven types with its own source, length, offset and ALMA settings. Optional modules add RSI-based take profit and stop levels and an ATR comparison as confirmation, and it
Stoch Strat is an overlay trading strategy that combines Stochastic Oscillator crossovers, MACD histogram momentum, and 50/100 Exponential Moving Averages for trend filtering. It generates long signals when Stochastic crosses up in oversold conditions while pr
This Pine v4 strategy is built on the weekly CFTC net position of commercial traders in commodity or financial futures, requested by contract code from an external Quandl data feed. It scales the net position within its three-year range into an index, and trea
This strategy calculates the MACD line and plots it as a colored histogram in a separate pane. Instead of traditional crossovers, it tracks consecutive rising or falling values on the MACD line. It enters long positions after a configurable number of consecuti
A strategy that finds pivot highs and lows only when they stand out from neighbouring bars by an ATR-based margin. After a significant pivot high it places a stop order to go long just above that high, and after a significant pivot low it places a stop order t
This trend-following strategy executes a classic Donchian channel breakout system designed to cross-validate backtest results against external framework benchmarks. It triggers a long entry when the closing price breaks above the highest high of the prior entr
This strategy calculates Bollinger Bands and Aroon oscillator values to identify mean-reversion opportunities. It enters a long position using full equity when the closing price crosses below the lower Bollinger Band while Aroon Up remains above a user-specifi
This strategy plots running pivot highs as red R circles and pivot lows as blue S circles directly on the price chart. It computes an EMA 3 and a Cto trend line from close prices, then generates long signals on upward EMA-Cto crossovers combined with price pos
This strategy calculates a chart-timeframe MACD oscillator alongside a higher-timeframe Simple Moving Average (SMA) trend filter using security requests. It triggers long signals when the MACD line crosses above its signal line while the higher-timeframe price
This strategy executes a long-only trend-following system based on a simple moving average, designed primarily for daily charts. It plots the moving average directly on the price chart and evaluates trading signals strictly on a user-defined day of the month,
This strategy combines Smart Money Concepts (BOS and CHoCH) with moving average trend filtering and volume spikes to generate trade signals. It checks for 20 EMA and 50 EMA alignment, along with volume 20% above its 20-period SMA. Long entries require a bullis
This strategy combines Bollinger Bands with a short RSI to fade moves that leave the bands and then return. A long requires the prior bar below the lower band and oversold, then a close back inside the band while RSI is between 30 and 50. Shorts mirror that at
This strategy executes trend-following long trades during pullbacks and scales out dynamically. It enters when a fast EMA exceeds a trend EMA by a minimum slope percentage, price pulls back near the fast EMA, and price trades above a 60-period EMA filter. Posi
Third-party code. ForexR lists open-source Pine scripts from GitHub; it did not write, test or endorse them, and their summaries are generated automatically from each script's code and README. Indicators describe the past, and a strategy's backtest can look better than live trading. Check a script on a demo account before you rely on it. CFDs and leveraged forex are complex instruments with a high risk of losing money rapidly.
Learn to Use Pine Scripts
Free, plain-English guides: add a script to TradingView, read what it does, test it and avoid the common traps.