Strategy vault / Mean reversion
Renko Reversal Alert
Pine Script strategy by Zer3192.
Pine ScriptMean reversion
The original spec has no written description. Read the source below.
Source Pine Script
/*backtest
start: 2021-05-08 00:00:00
end: 2022-05-07 23:59:00
period: 4h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=2
study("Renko Reversal alert", overlay=true)
//Buy entry if a bearish renko brick is followed by a bullish brick
//Sell entry if a bullish brick is followed by a bearish brick
long = close > open[1] and close[1] < open[2]
short = close < open[1] and close[1] > open[2]
//Use these alerts to create server-side alerts (right-click on one of the buy or sell arrows on the chart and choose "add alert")
alertcondition(long, title='Long opportunity', message='Renko reversal')
alertcondition(short, title='Short opportunity', message='Renko reversal')
//Use this to customize the look of the arrows to suit your needs.
plotshape(long, location=location.belowbar, color=lime, style=shape.arrowup, text="Buy")
plotshape(short, location=location.abovebar, color=red, style=shape.arrowdown, text="Sell")
if long
strategy.entry("buy", strategy.long)
else if short
strategy.entry("sell", strategy.short)
Published by Zer3192 on the FMZ strategy square · last modified 2022-06-12. Collected in the Quant Trading Vault. Unvalidated research: re-test with your own data and costs before trusting it.
Build this with AgenKit
A spec is not a trading system. Paste this into your coding agent and AgenKit runs a specialist team — architecture, test-first build, risk gates, review — with paper trading on by default.
/agenkit build a production-grade trading bot with a backtest engine, risk controls and paper trading by default from strategies/Renko-Reversal-Alert.md- npx agenkit install engineering-kit in your project
- Paste the command into your agent and approve each phase
- Get tests, backtest, risk controls and a paper-trading switch
Understand it first
Before you run this, read the lesson behind the idea and how to backtest it honestly. Specs like this one are the survivors of an unknown number of trials; deflate their results accordingly.
Related specs
- 1 2 3 Pattern Quantitative Trading Strategy with EMAs MACD and 4th Candle ExtensionPine Script · Mean reversion · 1h
- 3 10 Oscillator Profile Flagging StrategyPine Script · Mean reversion · 1d
- A Trend Reversal Strategy Based on Moving Averages Price Patterns and VolumePine Script · Mean reversion · 1d
- ATR and EMA based Dynamic Take Profit and Stop Loss Adaptive StrategyPine Script · Mean reversion · 1h
- Adaptive Mean Reversion Trading Strategy Based on Chande Momentum OscillatorPine Script · Mean reversion · 1d
- Adaptive Moving Average Tracking StrategyPine Script · Mean reversion · 1d