Type/to search

Gyroscopic Bands Strategy Based on Multi Time Frame and Average Amplitude

Common strategy
Created: 2023-11-24 17:29:39
Last modified: 3 years ago
1
Follow
1802
Followers

img

Overview

This strategy is named "Gyroscopic Bands Strategy Based on Multi Time Frame and Average Amplitude". Its main idea is to construct trading signals based on the average amplitude between the price and a particle that fits the price trajectory.

Strategy Logic

The strategy first defines a particle that fits the price trajectory. Under the influence of gravity and inertia, the trajectory of the particle will oscillate around the price. Then we calculate the average deviation between the particle and the price, and use it to construct upper and lower bands. When the price breaks through the upper or lower band, trading signals are generated.

Specifically, the particle position formula defined in the strategy is:

pos:=if pos<close nz(pos[1])+grav+traj else nz(pos[1])-(grav)+traj

Here grav represents the gravity term that makes the particle close to the price; traj represents the inertia term that keeps the particle's movement trend. The combination of these two items makes the particle oscillate around the price.

Then we calculate the average deviation avgdist between the price and the particle, and use it to construct upper and lower bands:

bbl=pos-sma(avgdist,varb) bbh=pos+sma(avgdist,varb)

Finally, go long when the price is greater than the upper band, and go short when less than the lower band.

Advantages

Compared with traditional moving average strategies, this strategy has the following advantages:

  1. Use particle trajectories to better simulate price fluctuations;
  2. The upper and lower bands can be adaptively adjusted based on historical average amplitude, which is conducive to capturing breakthroughs;
  3. Multi time frame design can switch between high and low time frames to capture more trading opportunities.

Risks

This strategy also has some risks:

  1. Improper parameter settings of particle motion may cause false signals or miss signals;
  2. Signal conflicts may occur when switching between multiple time frames;
  3. Breakthrough signals of upper and lower bands may increase stop loss risk.

Corresponding risk management measures include: optimizing parameters to reduce false signals, defining clear time frame timing rules, setting appropriate stop loss positions, etc.

Optimization Directions

This strategy can be optimized in the following aspects:

  1. Optimize particle motion related parameters to fit the price trajectory;
  2. Increase the number of time frame layers to confirm signals at higher time frames;
  3. Add volatility indicators to avoid signals during violent market fluctuations;
  4. Optimize stop loss strategies to reduce single stop loss.

Conclusion

This strategy improves the moving average strategy by introducing price trajectory fitting. It has features like adaptive parameters, multi time frames, stop loss optimization, etc. The key is to find a suitable particle motion equation to simulate the price. Although further testing and optimization is needed, the basic idea is feasible and worth further research.

Source
Pine
/*backtest
start: 2022-11-17 00:00:00
end: 2023-11-23 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4
//2 revert
strategy("Jomy's Gyroscopic Bands",precision=8,commission_value=.03,overlay=true,initial_capital =10000, default_qty_type=strategy.percent_of_equity, default_qty_value=100,  pyramiding=0)//,calc_on_order_fills= true, calc_on_every_tick=false) 
leverage=input(1,"leverage")
Strategy parameters
Strategy parameters
leverage
variable a (10 to the power of __
variable b
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)