1Copy the scriptPress Copy script above, or the copy button on the code below.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
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
182 lines of Pine Script v5 from Tradingview/grid-bot-simulator.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
Grid Bot Simulator divides a user-specified price channel between upper and lower bounds into equal grid intervals. Depending on the chosen market direction filter, the strategy executes buy and sell orders at grid levels to capture price oscillations. Main inputs include upper and lower price boundaries, grid count, direction filters, and date range parameters for backtesting. Designed for range-bound market simulation, the strategy operates without built-in stop losses by default.
Customizable upper and lower grid price limits
Configurable grid count and market direction filters
On-chart grid line visualizer and trade zone highlighting
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Upper Limit
price
49000.0
UpperLimit
Lower Limit
price
43000.0
LowerLimit
Number of Grids(10)
int
60
No_Grids
Market Direction
string
neutral
Dir
Signal Size
string
small
SS
Show Grids
bool
true
ShowGrids
Highlight Trade Zones
bool
true
HighLight
Show Only Current Grids
bool
false
ShowCurrent
High/Low for signals
bool
true
Extremes
Start Date
time
timestamp("01 mar 2022 00:00 +0000")
bt_start
End Date
time
timestamp("31 dec 9999 00:00 +0000")
bt_end
backtest period
string
day
backtestPeriod
Show all 14 settings
Setting
Type
Default
Variable
length1
int
5
length1
length
int
5
length
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.
Omar Edited WF is a trading strategy overlay built around Williams Fractals and multiple Exponential Moving Averages. It detects high and low fractal pivot points over configurable lookback periods alongside three adjustable EMA trendlines. Long entries are ma
This strategy calculates dynamic support and resistance levels using pivot highs and lows alongside a custom smoothed trend filter and a 3-period EMA. It identifies entry opportunities when price breaks out relative to the trend filter and short-term EMA cross
This strategy plots on the price chart and enters when three smoothed moving averages are aligned, RSI is on the matching side of 50, and a Williams fractal appears. An upward stack with RSI above 50 and a down fractal opens a long; the opposite setup opens a
This strategy combines three Exponential Moving Averages with Williams Fractals to execute trend-following or mean-reverting trades. It analyzes price structure using short, medium, and long-term EMAs along with fractal highs and lows. Entries trigger when fra
This strategy executes trades based on pivot levels, an exponential moving average, and a multi-stage smoothing trend line. It identifies support and resistance points from pivot highs and lows, combining them with price relationship rules against a custom smo
KC15 is a price-chart strategy that configures two moving averages, a Bollinger Band Width Percentile filter, and PMARP entry and exit thresholds for long and short trades. Users can switch each average between SMA and EMA, set lengths and colors, and toggle l