Type/to search

Dual Timeframe Neural Network Strategy

Cryptocurrency
Created: 2023-09-14 16:10:26
Last modified: 3 years ago
1
Follow
1781
Followers

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:

  1. Get price change data from two timeframes, e.g. daily and 1-hour

  2. Feed the price change into a neural network to train it and get predicted outputs

  3. When predictions from both axes exceed a threshold in the same direction, a trade signal is generated

  4. Go long when daily predicts long and 1-hour predicts long

  5. Go short when daily predicts short and 1-hour predicts short

  6. 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.

Source
Pine
/*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)
Strategy parameters
Strategy parameters
Threshold
Large timeframe
Small timeframe
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)