Strategy vault / Mean reversion
Aroon Indicator Based Quantitative Strategy
This strategy purely uses the Aroon indicator to determine market trend direction for generating simple buy and sell signals. It combines Aroon's trend capturing ability to build a mechanical trading system purely…
Overview
This strategy purely uses the Aroon indicator to determine market trend direction for generating simple buy and sell signals. It combines Aroon's trend capturing ability to build a mechanical trading system purely based on the indicator.
Strategy Logic
Calculate bars with highest high and lowest low over 7 periods.
Calculate ratio of highest high bar over total bars as upper line.
Calculate ratio of lowest low bar over total bars as lower line.
Generate buy signal when upper line is greater than lower line.
Generate sell signal when lower line is greater than upper line.
Control entry directions via strategy parameters.
Open and close orders within specified timeframe.
Advantage Analysis
Purely indicator driven trading based solely on Aroon.
Simple indicator parameters, easy to understand and optimize.
Flexible selection of long/short direction for different instruments.
Customizable timeframe for backtest and live trading.
Clear trading signals, easy to grasp and execute.
Risk Analysis
Prone to false signals as a single indicator.
Cannot accurately judge strength of uptrends/downtrends.
Has some lag, unable to timely capture reversals.
Cannot dynamically adjust based on market changes.
Possibility of drawdown risks.
Optimization Directions
Test across different instruments and timeframes.
Add filters to improve signal quality.
Incorporate trend indicators to determine overall trend.
Develop dynamic exits based on evolving trends.
Optimize parameters and test combinations.
Add position sizing and risk management.
Summary
This strategy provides simple trend signals based on Aroon. There is room for improvement in avoiding misleading signals and risk control. But the logic is simple and clear, serving as basic quant strategy for enhancement. Overall a practical strategy worth further testing and optimization.
Parameters
| Name | Default | What it controls |
|---|---|---|
| v_input_1 | true | Long |
| v_input_2 | false | Short |
| v_input_3 | 7 | length |
| v_input_4 | 1900 | From Year |
| v_input_5 | 2100 | To Year |
| v_input_6 | true | From Month |
| v_input_7 | 12 | To Month |
| v_input_8 | true | From Day |
| v_input_9 | 31 | To Day |
Source Pine Script
/*backtest
start: 2023-08-19 00:00:00
end: 2023-09-18 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//Noro
//2018
//@version=2
strategy(title = "Noro's Aroon Strategy v1.0", shorttitle = "Aroon str 1.0", overlay = false, default_qty_type = strategy.percent_of_equity, default_qty_value = 100, pyramiding = 0)
//Settings
needlong = input(true, defval = true, title = "Long")
needshort = input(false, defval = false, title = "Short")
length = input(7, defval = 7, minval = 1, maxval = 1000)
fromyear = input(1900, defval = 1900, minval = 1900, maxval = 2100, title = "From Year")
toyear = input(2100, defval = 2100, minval = 1900, maxval = 2100, title = "To Year")
frommonth = input(01, defval = 01, minval = 01, maxval = 12, title = "From Month")
tomonth = input(12, defval = 12, minval = 01, maxval = 12, title = "To Month")
fromday = input(01, defval = 01, minval = 01, maxval = 31, title = "From Day")
today = input(31, defval = 31, minval = 01, maxval = 31, title = "To Day")
//Aroon
upper = 200 * (highestbars(high, length+1) + length)/length
lower = 200 * (lowestbars(low, length+1) + length)/length
plot(upper, color=#FF6A00)
plot(lower, color=#0094FF)
//Signals
up = upper > lower
dn = upper < lower
//Trading
if up
strategy.entry("Long", strategy.long, needlong == false ? 0 : na)
if dn
strategy.entry("Short", strategy.short, needshort == false ? 0 : na)
if true
strategy.close_all()Published by ChaoZhang on the FMZ strategy square · last modified 2023-09-19. 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/Aroon-Indicator-Based-Quantitative-Strategy.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