
The strategy is named “Turnaround Tuesday Strategy (Weekend Filter)”. The main idea is to buy at the Monday open and sell at the Wednesday open when certain conditions based on moving averages and other filters are met, in order to capture the Tuesday turnaround. By filtering with RSI, ATR, and excluding specific times like May, the strategy aims to improve its win rate and risk-reward ratio.
The Turnaround Tuesday Strategy (Weekend Filter) uses a combination of moving averages, RSI, ATR, and other indicators to buy and sell at specific times, aiming to capture the Tuesday turnaround. The strategy has low trading frequency, small commission costs, and improves its win rate and risk-reward ratio through time period and indicator filtering. However, the strategy also has certain limitations and risks, such as underperformance in trending markets and fixed buying/selling times and holding periods. Future optimizations can introduce more filtering conditions, optimize exit timings, dynamically adjust parameters, manage positions, and control risk to better adapt to changing market conditions.
/*backtest
start: 2024-03-01 00:00:00
end: 2024-03-31 23:59:59
period: 2h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © muikol
//@version=5
strategy("Turnaround Tuesday", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=0.035)
// Inputs for MA period, filter_1, filter_2, month filter, and testing period
ma_period = input(30, title="Moving Average Period")
use_filter_1 = input(true, title="Use RSI Filter")
use_filter_2 = input(true, title="Use ATR Filter")
use_month_filter = input(true, title="Exclude May")
start_date = input(defval=timestamp("2009-01-01 00:00:00"), title="Start Backtest")
end_date = input(defval=timestamp("2025-01-01 00:00:00"), title="End Backtest")
// Data calculations
MA_tt = ta.sma(close, ma_period)
atr10 = ta.atr(10)
rsi3 = ta.rsi(close, 3)
c_1 = close[1]
// Entry conditions
isMonday = dayofweek == dayofweek.monday
bear = close[1] < MA_tt[1]
filter_1 = use_filter_1 ? rsi3[1] < 51 : true
filter_2 = use_filter_2 ? c_1/atr10[1] < 95 : true
notMay = use_month_filter ? month != 5 : true
entryCondition = isMonday and bear and notMay and filter_1 and filter_2
// Date check
inTestPeriod = true
// Exit conditions
isWednesdayOpen = dayofweek == dayofweek.wednesday
// Entry and exit triggers
if entryCondition and inTestPeriod
strategy.entry("Buy", strategy.long)
if isWednesdayOpen and strategy.position_size > 0 and inTestPeriod
strategy.close("Buy")
// Plot the moving average
plot(MA_tt, title="Moving Average", color=color.blue)