1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
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
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
Fibonacci Martingale Strategy recalculates an average entry and closes the whole position when price reaches a take-profit percentage above that average. Order sizes, deviation, scales, and the safety-order cap are inputs. Stop loss is optional and off by default, so losses are not capped unless that setting is enabled. It draws on the price chart and only trades long.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Base Order Size (%)
float
3.4
base_order_size_pct
Safety Order Size (%)
float
2.1
safety_order_size_pct
Safety Order Step Scale
float
1.7
safety_order_step_scale
Safety Order Volume Scale
float
2.8
safety_order_volume_scale
Price Deviation to Open Safety Orders (%)
float
0.89
initial_safety_order_distance_pct
Take Profit (%)
float
1.49
take_profit_percentage
Max Safety Orders Count
int
7
max_safety_orders_count
Use Stop Loss
bool
false
use_stop_loss
Stop Loss Deviation (%)
float
60.0
stop_loss_deviation_pct
Bubble background
color
color.new(color.white, 100)
Bubble background
Bubble text
color
color.white
Bubble text
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.
This strategy divides a fixed price range between an upper and a lower limit into equally spaced grid levels and plots them on the price chart. It marks a buy when price crosses down through a grid and a sell when price crosses up through a grid, using either
The Chained Linear Regression Reversal Strategy plots linear regression channels with upper and lower standard deviation bands directly on the price chart across a user-defined time window. When price breaks out of the static channel for a confirmed number of
3C QFL Mean Reversal is a strategy based on the Quickfinger Luc (QFL) trading methodology. It identifies breakdown buying opportunities below established price base levels and enters mean-reversion trades. The strategy includes multi-safety order DCA scaling,
This strategy builds a spot grid between user-set high and low prices and draws it on the price chart. It splits that range into ten levels and places up to five long limit orders at the lower levels, sizing each from current equity. Orders already below price
Calculates the distance between the current price and the opposite end of the latest fair value gap, entering trades on the expectation that price will partially fill the gap. It incorporates risk management with customizable stop loss, take profit based on ri
This strategy identifies Wyckoff consolidation ranges directly on the price chart to trade potential spring and upthrust events. It calculates highest highs and lowest lows over a customizable lookback period, filtering setups by average volume spikes and ATR