Multi-Timeframe Trend Tracking Intraday Scalping Strategy
Overview
This strategy combines moving average indicators across multiple timeframes to determine trend consistency and takes scalping actions during the day to follow the trend and make profits.
Strategy Logic
This strategy uses 8-period and 20-period moving averages on the 5-minute, 15-minute, 30-minute and 60-minute timeframes to generate trading signals. A buy signal is generated when the 8-period MA crosses above the 20-period MA. A sell signal is generated when the 8-period MA crosses below the 20-period MA.
The strategy requires consistent signals across the four timeframes before issuing a trade order. A buy or sell order is placed only when the moving averages align on all four timeframes.
Once entered into a position, the strategy sets a fixed profit target to take profits intraday.
Specifically, the strategy uses the security() function to retrieve MA values from different timeframes. It calculates the difference between the 8-period and 20-period MAs on the 5-min, 15-min, 30-min and 60-min charts.
Buy and sell signals are determined by whether the difference line crosses above/below the zero line. Multiple islong and isshort flags are used to record the signal on each timeframe. Orders are placed when the islong and isshort conditions are met.
After entering a trade, the strategy uses strategy.exit() to set a fixed profit target for scalping.
Advantage Analysis
The advantages of this strategy include:
-
Multi-timeframe design filters noise and reduces trade frequency.
-
Intraday scalping with profit optimization accumulates small gains consistently.
-
Clear code structure, easy to understand and optimize.
-
Reasonable conditions help control risk.
Risk Analysis
Potential risks of this strategy:
-
Multi-timeframe may miss subtle trend changes.
-
Frequent scalping trades increase costs.
-
Fixed profit target lacks flexibility.
-
Depends on indicators, risks being fooled.
Optimization Directions
Possible optimizations:
-
Add more timeframes for more robust signals.
-
Dynamic profit target based on ATR.
-
Additional filters like volume increase or history extremes.
-
Optimize MA periods for best parameters.
-
Add machine learning to judge signal reliability.
Summary
Overall this is a typical multi-timeframe trend tracking strategy using intraday scalping. The logic is clear and code well structured. With proper optimization it can become a very practical scalping strategy template.
/*backtest
start: 2022-11-09 00:00:00
end: 2023-11-15 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=2
strategy(title="PeBAS $JPY Scalper 15m ",overlay=true)
zeigeallebars= input(false, title="Zeige alle (Show all) Candles/Bars?")
profitwert=input(52, title="Profit")- 1

