Dual Timeframe Neural Network Strategy
Strategy Logic
This strategy uses a neural network prediction model across two timeframes to determine price trend, entering trades when signals align.
The logic is:
-
Get price change data from two timeframes, e.g. daily and 1-hour
-
Feed the price change into a neural network to train it and get predicted outputs
-
When predictions from both axes exceed a threshold in the same direction, a trade signal is generated
-
Go long when daily predicts long and 1-hour predicts long
-
Go short when daily predicts short and 1-hour predicts short
-
If predictions diverge, close positions
Using dual timeframe inputs improves accuracy by judging trend from multiple dimensions. Trades are only taken when aligned, avoiding false signals.
Advantages
-
Dual timeframe prediction improves accuracy
-
Neural networks model complex data
-
Trading only on aligned signals avoids traps
Risks
-
Requires large datasets for network training
-
Iterative testing needed for network design
-
Aligned signals occur less frequently
Summary
This strategy leverages neural networks across two timeframes to accurately determine trend before trading. But parameter tuning is needed for ideal trade frequency. Overall it provides robust trend guidance with precision.
/*backtest
start: 2023-08-14 00:00:00
end: 2023-09-13 00:00:00
period: 3h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=2
strategy("ANN 2 signals", overlay=false, precision=4, calc_on_every_tick=true)
threshold = input(title="Threshold", type=float, defval=0.006, step=0.001)- 1
