OPEN-SOURCE SCRIPT

BTC/USD Gaussian Channel 1 Day Chart - Foneysmiles v1.0

Cryptocurrency trading strategy specifically designed for BTC/USD on a daily timeframe.

Strategy Framework:
Initial capital: $10,000
Position size: 60% of equity per trade
Commission: 0.1%
Slippage: 4 points
Time range: From January 2018 to end of 2069 (effectively no end date)

Gaussian Channel: The primary technical indicator that creates an adaptive channel around price
Uses a complex Gaussian filter with customizable poles (default 4)
Sampling period of 144 days
True Range multiplier of 1.414
Options for reduced lag and fast response modes
Price source defaults to HLC3 (High + Low + Close / 3)

Stochastic RSI with:
RSI length: 21 periods
Stochastic length: 200 periods
K smoothing: 1 period
D smoothing: 4 periods

Entry Conditions:
A long position is entered when ALL of these conditions are met:

The Gaussian filter is trending up (finalFilter > finalFilter[1])
Price is above the upper Gaussian channel band (close > hband)
Stochastic RSI is in extreme territory (k > 80 or k < 20)
Within the specified date range

Exit Conditions:
Positions are closed when price crosses below the upper band of the Gaussian channel

The visualization includes:
A color-coded Gaussian filter line (green when rising, red when falling)
Upper and lower bands forming a channel
The channel is filled with a semi-transparent version of the same color

This is a trend-following strategy that aims to catch strong upward moves in Bitcoin while using the Stochastic RSI as an additional filter. The strategy only takes long positions and doesn't include any short trades.

foneysmilesgmail.com if you have any questions or have other use cases

免责声明