Strategy vault / Mean reversion
Monday Reversal Intraday Trend Following Strategy
The main idea of this strategy is to profit from Monday's intraday reversal using trend following.

Overview
The main idea of this strategy is to profit from Monday's intraday reversal using trend following.
Principles
The core logic is:
Check if it is Monday, if yes, continue to next steps;
Identify if an uptrend reversal pattern exists - Close[1] < Close[2] and Close[2] < Close[3];
If reversal pattern confirmed, go long at the close of 3rd bar to follow the trend;
Exit if today's high is breached, or stop loss is hit;
Close position after 6 hours.
The strategy capitalizes on specific Monday reversal, identifies reversal patterns to go long at relative lows for profits. Stop loss in place to control risks.
Advantages
The biggest advantages are:
Profits from Monday reversals during specific periods;
Clear entry signals from reversal candlestick patterns;
Stop loss and take profit to control risks;
Trend following approach maximizes profits;
Simple and easy to understand logic;
Risks
There are some risks:
Losses if Monday reversals not significant;
Price may retrace after entry leading to stop loss;
Sudden market changes may result in large stop loss;
Holding too long may also lead to losses;
The solutions are optimizing stop loss, shortening holding time, and controlling single loss size.
Enhancements
The strategy can be improved by:
Using machine learning to identify reversals more accurately;
Optimizing stop loss strategies like trailing stop or partial stop loss;
Incorporating more factors to judge trend strength;
Dynamically adjusting holding time;
Using algorithms to find optimal parameters;
Adding position switching for two-way trading;
These can increase the win rate and profitability.
Conclusion
In conclusion, the strategy capitalizes on Monday reversals, with clear entry/exit rules, to implement a simple trend following strategy. It can achieve better results than fixed stop loss/take profit. Further optimizations are needed to address market uncertainty. The strategy provides a reference for intraday trading.
Parameters
| Name | Default | What it controls |
|---|---|---|
| v_input_1 | 2018 | FirstYear |
| v_input_2 | false | deltaDay |
| v_input_3 | false | StartHour |
| v_input_4 | 6 | HoldTime |
| v_input_5 | true | MM |
| v_input_6 | -7 | startHour |
| v_input_7 | 34 | endHour |
| v_input_8 | 30 | exitHour |
Source Pine Script
/*backtest
start: 2023-10-06 00:00:00
end: 2023-11-05 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
strategy("ET Forex TurnaroundMonday", overlay=true)
FirstYear = input(2018, minval=2000, maxval=2023, step=1)
FirstMonth = 1 //input(1, minval=1, maxval=12, step=1)
FirstDay = 1 //input(1, minval=1, maxval=31, step=1)
deltaDay = input(0)
StartHour = input(0)
f_barssince(_cond, _count) => _barssince=bar_index-valuewhen(_cond, bar_index, _count)
HoldTime = input(6, step=1)
MM = input(1)
startHour = input(-7, step=1)
endHour = input(34, step=1)
exitHour = input(30, step=1)
startdateCond = (year > FirstYear or (year == FirstYear and (month > FirstMonth or (month == FirstMonth and dayofmonth >= FirstDay))))
iHour = hour
if iHour > 19
iHour := iHour-20
else
iHour := iHour+4
timeCondition = true //(iHour>=startHour and iHour<=endHour and iHour<=exitHour)
since_flat_condition = strategy.position_size == 0
entryPrice=strategy.position_avg_price
EntryLongCondition = dayofweek == (dayofweek.monday+deltaDay) and close[0] < close[1] and close[1]<close[2] and startdateCond //and timeCondition and iHour > StartHour
ExitTimeCondition = false//(f_barssince(since_flat_condition, 0)>=HoldTime)
ExitLongCondition = strategy.position_size > 0 and (close[0] > high[1])// or close[0]< entryPrice-abs(close[1]-close[2])*0.2)//(ExitTimeCondition) //iHour >= exitHour or
strategy.initial_capital =50000
// MM Block
lots = if MM < 2
strategy.initial_capital
else
strategy.equity
lots := lots/close
entryPrice:=strategy.position_avg_price
strategy.close("ETLong",when=(ExitLongCondition==true))
strategy.entry("ETLong", strategy.long, qty=lots, comment="OpenLong",when=(EntryLongCondition==true))
Published by ChaoZhang on the FMZ strategy square · last modified 2023-11-06. 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/Monday-Reversal-Intraday-Trend-Following-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