//@version=6
strategy(
title = "[SA-TEST 03]",
overlay = false,
initial_capital = 10000,
default_qty_type = strategy.percent_of_equity,
default_qty_value = 100,
pyramiding = 0,
commission_type = strategy.commission.percent,
commission_value = 0.01,
slippage = 0,
margin_long = 0,
margin_short = 0,
calc_on_order_fills = true,
calc_on_every_tick = true,
process_orders_on_close = true,
fill_orders_on_standard_ohlc = true)
// Classic RSI reversal:
// long when RSI crosses BACK ABOVE oversold (i.e., recovering from a dip)
// exit when RSI crosses BACK BELOW overbought (i.e., reversing from a top)
length = 14
oversold = 30
overbought = 70
rsi = ta.rsi(close, length)
longCondition = ta.crossover(rsi, oversold)
exitCondition = ta.crossunder(rsi, overbought)
if longCondition
strategy.entry("Long", strategy.long)
if exitCondition
strategy.close("Long")
// Optional: plot the RSI with threshold lines
plot(rsi, "RSI", color.aqua)
hline(oversold, "Oversold", color.green)
hline(overbought, "Overbought", color.red)
Overview
SA-TEST 03 opens a long when RSI crosses above the oversold level and closes that long when RSI crosses below the overbought level. There are no short entries and no stop loss. Size defaults to 100 percent of equity, with a 0.01 percent commission and zero slippage. Length and thresholds are fixed in the code, not inputs. Signals can change on the live bar.
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 combines Larry Williams' Vix Fix synthetic volatility indicator with Bollinger Bands. It calculates standard and inverted Williams Vix Fix metrics, displaying them as histogram columns with standard deviation bands in a separate pane. Long entrie
This strategy executes mean-reversion trades based on Bollinger Bands and the Stochastic Oscillator. Long orders trigger when price dips below the lower band alongside a bullish Stochastic crossover, with an optional oversold threshold. Short orders execute on
This strategy fades Bollinger Band extremes using the close. It enters short when price crosses above the upper band and the 14-period RSI is above 70, and enters long when price crosses below the lower band and RSI is below 30. It closes half of an open short
This strategy calculates the WaveTrend oscillator alongside Stochastic RSI to identify reversal setups at overbought and oversold extremes. It enters long positions when the WaveTrend oscillator crosses upward below configured oversold levels, and enters short
This strategy tracks the Williams %R oscillator to trade mean-reversion bounces from overbought and oversold extremes. It opens long or short positions when a reversal signal occurs alongside confirming price direction, while generating JSON-formatted alert pa
This strategy calculates a smoothed Relative Strength Index and plots self-adjusting linear regression bands with overbought and oversold boundaries in a separate pane. It enters long positions through dollar-cost averaging orders scaled across market phases a