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
168 lines of Pine Script v4 from strategysample.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
Hammers & Stars Strategy YouTube calculates stop loss as ATR multiplied by a user-defined multiplier and sets take profit using the risk-reward ratio. Fib level determines pattern confirmation thresholds. Filters adjust for ATR size, EMA length, trading dates, and time sessions. The strategy draws signals directly on the price chart. Main settings change pattern confirmation and trading filters. It supports limit orders for alerts and has no exit rules beyond take profit.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Stop Loss ATR
float
1.0
stopMultiplier
R:R
float
1.0
rr
Fib Level
float
0.333
fibLevel
Use Oanda Demo?
bool
false
oandaDemo
Use Limit Order?
bool
true
limitOrder
Days To Leave Limit Order
int
2
gtdOrder
Account Balance
float
1000.0
accountBalance
Account Currency
string
USD
accountCurrency
Risk Per Trade %
float
2.0
riskPerTrade
>= ATR Filter
float
0.0
atrMinFilterSize
<= ATR Filter
float
3.0
atrMaxFilterSize
EMA Filter Length
int
0
emaFilterLength
Show all 16 settings
Setting
Type
Default
Variable
Start Date Filter
time
timestamp("01 Jan 1000 13:30 +0000")
startTime
End Date Filter
time
timestamp("1 Jan 2099 19:30 +0000")
endTime
Time Session To Ignore Trades
session
0600-0915
timeSession
Use Time Session Filter
bool
false
useTimeFilter
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.
Exceeded Candle [Alorse] is a mean-reversion strategy that identifies candlestick engulfing patterns combined with Bollinger Bands filters. It enters a long position when a green candle surpasses the body of the previous red candle while price is below the mid
Mean Reversion Strategy is an overlay strategy that identifies pullbacks using a long-term EMA, RSI, and candlestick patterns. It generates long signals when a bullish engulfing candle forms below the EMA while RSI is oversold, and short signals when a bearish
ESU2023-10M - V1 is an intraday trend-reversal strategy designed for index futures contracts on the price chart. It calculates a 3-period moving average of candle highs and lows alongside specific three-bar price action patterns to detect short-term swing high
The STRG One Bar Pursuit strategy identifies single-bar momentum reversals by monitoring shifts between bullish and bearish candlesticks starting from the year 2024. It enters a long position when a bullish candle follows a bearish candle and enters a short po
This strategy identifies trade opportunities based on candlestick wick imbalances relative to the Average True Range. It enters positions when candle wicks exceed defined thresholds and filters out doji candles using a minimum body ATR requirement. Exits are h
This strategy identifies multiple classic candlestick patterns, including Engulfing, Harami, Morning and Evening Stars, and Three White Soldiers. It executes trades directly on the price chart when selected bullish or bearish patterns trigger. Users can toggle