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
PaperHands Strategy executes long and short entries, re-entries, and signal-based exits with risk management rules. Position exits support fixed-tick or ATR-based stop-loss and take-profit targets, trailing stops, break-even offsets, and session-based position flattening. Key settings configure order execution, session time windows, blackout periods, and daily loss/profit thresholds.
Fixed-tick and ATR-based take-profit and stop-loss targets
Optional trailing stop and break-even triggers
Session time window and blackout period position flattening
Configurable signal filtering and session profit/loss thresholds
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Take-Profit Type
enum
TakeProfitType.None
tpType
Take-Profit Fixed Ticks
int
20
tpFixedTicks
Take-Profit ATR Multiple
float
3
tpATRMultiple
Stop-Loss Type
enum
StopLossType.Fixed
slType
Stop-Loss Fixed Ticks
int
10
slFixedTicks
Stop-Loss ATR Multiple
float
1.5
slATRMultiple
Enable Trailing Stop-Loss
bool
false
slEnableTrailing
Trailing Stop-Loss Trigger
int
20
slTrailingTriggerTicks
Trailing Stop-Loss Offset
int
20
slTrailingOffsetTicks
Enable Break-Even Stop-Loss
bool
false
slEnableBreakEven
Break-Even Stop-Loss Trigger
int
10
slBreakEvenTriggerTicks
Break-Even Stop-Loss Offset
int
1
slBreakEvenOffsetTicks
Show all 40 settings
Setting
Type
Default
Variable
Flatten position at end of Trading Time Window
bool
false
enableTradingTimeWindowFlatten
Flatten position at start of Blackout Time Windows
bool
false
enableBlackoutTimeWindowFlatten
ATR Length
int
14
atrLen
Session Profit Threshold
int
0
sessionProfitThreshold
Session Loss Threshold
int
0
sessionLossThreshold
Enter LONG
bool
true
showEnterLongSignals
Re-enter LONG
bool
true
showReenterLongSignals
Exit LONG
bool
true
showExitLongSignals
Enter SHORT
bool
true
showEnterShortSignals
Re-enter SHORT
bool
true
showReenterShortSignals
Exit SHORT
bool
true
showExitShortSignals
Restrict signals to the specified Trading Time Window
bool
false
useSignalsTradingTimeWindow
Trading Time Window
session
0945-1530:23456
signalsTradingTimeWindow
Prevent signals during the specified Blackout Time Window 1
bool
false
useSignalsBlackoutTimeWindow1
Blackout Time Window 1
session
0915-0945:23456
signalsBlackoutTimeWindow1
Prevent signals during the specified Blackout Time Window 2
bool
false
useSignalsBlackoutTimeWindow2
Blackout Time Window 2
session
1200-1300:23456
signalsBlackoutTimeWindow2
Allow Repainting
bool
false
allowSignalRepainting
Entry Signal Offset
int
12
entrySignalOffset
Exit Signal Offset
int
4
exitSignalOffset
Real candle correct color
bool
false
useEntryConfluence1
Heikin-Ashi candle correct color
bool
false
useEntryConfluence2
Heikin-Ashi dot correct color
bool
false
useEntryConfluence3
Heikin-Ashi candle has flat bottom/top
bool
false
useEntryConfluence4
Heikin-Ashi candle is not touching EMA Cloud
bool
false
useEntryConfluence5
Matching EMA Cloud trend
bool
false
useEntryConfluence6
Widening EMA Cloud
bool
false
useEntryConfluence7
Price correct side of MA1
bool
false
useEntryConfluence8
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 runs an ultra-fast MACD in a separate pane to capture short-term momentum scalps. It filters trade entries using micro-trend direction, volume spikes, and candle body strength within specified session hours. Positions default to two percent of eq
This strategy calculates a Volume-Weighted Moving Average Convergence Divergence (VWMA MACD) and its histogram average to generate trade signals in a separate pane. It enters long positions when the MACD histogram crosses above its simple moving average and sh
This strategy computes the MACD with user-defined fast, slow, and signal lengths, then plots the MACD line, signal line, and histogram in a separate pane. It generates long entries on MACD crossover and short entries on MACD crossunder, but restricts signals t
This strategy draws in a separate pane and trades intraday reversion toward a session VWAP. It builds that VWAP and its standard deviation from typical price and volume during New York regular hours, then converts close into a z-score. Shorts require the z-sco
This strategy plots VWAP on the price chart and trades only between a start hour and an end hour. It enters long when VWAP is rising and RSI is above a threshold, and short when VWAP is falling and RSI is below a threshold. If the reversal option is on, it clo
This strategy enters long or short on the price chart when price is on the correct side of a 200-period EMA, MACD agrees, RSI is not at the opposing extreme, ADX exceeds a threshold, volume beats a 20-bar average, and close breaks the recent high or low. A tim