This strategy places buy-stop and sell-stop orders around the opening-session high and low, offset by a user-defined pip gap, and only allows those orders during a separate trading session.
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
145 lines of Pine Script v5 from 50 Pips A Day Strategy - Kaspricci.pine, published under GPL-3.0. Keep the author's credit and licence lines when you reuse it.
50 Pips A Day Strategy - Kaspricci exits with a fixed or ATR-based stop loss and a matching take-profit distance or ratio. Optional settings size the position from account risk and round quantity to lots. It draws on the price chart. Calculation on every tick can change signals on the live bar.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Opening Time
session
0700-0800:23456
openingSession
Trading Time
session
0800-2000:23456
tradingSession
Source for Buy Stop order
source
high
buyStopSource
+ Pips:
float
2.0
buyStopGap
Source for Sell Stop order
source
low
sellStopSource
- Pips:
float
2.0
sellStopGap
Cancel pending order when new trade entered?
bool
true
closePending
Stop Loss Type
string
FIX
stopLossType
ATR: Length
int
14
atrLength
Factor
float
2.0
atrFactor
TP Ration
float
2.0
takeProfitRatio
FIX: Stop Loss
float
15.0
fixStopLoss
Show all 21 settings
Setting
Type
Default
Variable
Take Profit
float
50.0
fixTakeProfit
useRiskMagmt
bool
false
useRiskMagmt
Risk in %
float
1.0
riskPercent
rsikCapital
string
Balance
rsikCapital
Apply Lot sizing
bool
true
applyLotSizing
API Entry - Long
text
Enter Long - 3commas,alerteron etc
i_apiEnterLong
API Exit - Long
text
Exit Long - 3commas,alerteron etc
i_apiExitLong
API Entry - Short
text
Enter Short - 3commas,alerteron etc
i_apiEnterShort
API Exit - Short
text
Exit Short - 3commas,alerteron etc
i_apiExitShort
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 enters long when price closes above the prior Donchian high and short when it closes below the prior Donchian low, only while flat and inside a Taipei-hour window. It exits on a MACD histogram reversal or through an ATR stop and a percentage take
This strategy identifies volatility breakout opportunities by constructing dynamic ATR-based price boxes and detecting volatility squeezes. Trades are filtered using an exponential moving average trend condition and designated session hours. Entries trigger up
Calculates standard Bollinger Bands and identifies band expansion breakouts where upper and lower bands move in opposite directions. It enters long positions when price breaks above the upper band with a high candle body percentage, and enters short positions
This overlay strategy offers two selectable entry modes: a Bollinger squeeze on typical price and a simple moving-average cross. It filters trades by weekday, session, date range, and an optional news window, and can restrict direction or invert the side. Risk
This strategy plots VWMA-based Bollinger bands on the 1-minute ES futures price chart for volatility analysis and potential breakout identification. It calculates dynamic long and short stop loss and take profit levels using percentage inputs relative to entry
This strategy detects price breakouts above rolling highest highs or below lowest lows over a customizable lookback period. It includes optional volume spike and ATR volatility threshold filters, along with bar confirmation rules. Positions are taken upon conf