HomeCryptoTrader

Adaptive Price Channel Strategy

This strategy is an adaptive price channel strategy based on the Average True Range (ATR) indicator and the Average Directional Index (ADX). It aims to identify sideways markets and trends in the price movements and make trades accordingly.

The strategy uses a length parameter for the ATR and ADX indicators, which determines the length of the calculation for these indicators. The strategy also uses an ATR multiplier, which is multiplied by the ATR to determine the upper and lower bounds of the price channel.

The first step of the strategy is to calculate the highest high (HH) and lowest low (LL) over the specified length. The ATR is also calculated over the same length. Then the strategy calculates the positive directional indicator (+DI) and negative directional indicator (-DI) based on the up and down moves in the price, and uses these to calculate the ADX.

If the ADX is less than 25, the market is considered to be in a sideways phase. In this case, if the price closes above the upper bound of the price channel (HH - ATR multiplier * ATR), the strategy enters a long position, and if the price closes below the lower bound of the price channel (LL + ATR multiplier * ATR), the strategy enters a short position.

If the ADX is greater than or equal to 25 and the +DI is greater than the -DI, the market is considered to be in a bullish phase. In this case, if the price closes above the upper bound of the price channel, the strategy enters a long position. If the ADX is greater than or equal to 25 and the +DI is less than the -DI, the market is considered to be in a bearish phase. In this case, if the price closes below the lower bound of the price channel, the strategy enters a short position.

The strategy exits a position after a certain number of bars have passed since the entry, as specified by the exit_length input.

In summary, this strategy attempts to trade in accordance with the prevailing market conditions by identifying sideways markets and trends and making trades based on price movements within a dynamically-adjusted price channel.

This strategy takes a read on the market and either takes a channel strategy or trades volatility based on current trend. Works well on 2, 3 ,4, 12 hour for BTC. It’s my first attempt and creating a strategy. I am very interested in constructive criticism. I will look into better risk management, maybe a trailing stop loss. Other suggestions welcome. This is my first attempt at a strategy.

Here are the settings I used.
Inputs
Length 20
Exit 10
ATR 3.2
Dates I picked when I got into Crypto

Properties
Capital 1000
Order size 2 Contracts
Pyramiding 1
Commission .05
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?