OPEN-SOURCE SCRIPT

TSI w SuperTrend decision - Strategy [presentTrading]

This strategy aims to improve upon the performance of Traidngview's newly published "Trend Strength Index" indicator by incorporating the SuperTrend for better trade execution and risk management. Enjoy :)

█ Introduction and How it is Different

The "TSI with SuperTrend Decision - Strategy" combines the Trend Strength Index (TSI) with SuperTrend indicators to determine entry and exit points. Unlike traditional strategies that rely solely on one indicator, this method leverages the strengths of both TSI and SuperTrend to provide a more nuanced and adaptive trading strategy.

This dual approach allows for capturing trends more effectively, especially in volatile markets.

BTCUSD 8h LS Performance
스냅샷

█ Strategy, How it Works: Detailed Explanation

🔶 Trend Strength Index (TSI)

The TSI is a momentum oscillator that shows both the direction and strength of a trend. It is calculated by comparing the price movement with the bar index over a specified period. The formula for TSI is as follows:

```
TSI = (PC / |PC|)
where:
PC = Change in price over the period
```

In this strategy, TSI is calculated using the closing prices and a default period of 64 bars. The TSI values help identify overbought and oversold conditions, providing signals for potential market reversals.

🔶 SuperTrend Indicator

The SuperTrend is a trend-following indicator based on the average true range (ATR). It helps in identifying the direction of the market trend. The SuperTrend calculation involves:

```
SuperTrend = HLC3 ± (Factor * ATR)
where:
HLC3 = (High + Low + Close) / 3
Factor = User-defined multiplier
ATR = Average True Range over a period
```

The SuperTrend settings in this strategy include a length of 10 bars and a factor of 3.0.

Last Bull Cycle of BTC
스냅샷

🔶 Entry and Exit Conditions

The strategy uses the TSI and SuperTrend together to determine entry and exit points:

- Long Entry: When the SuperTrend indicates a downward trend (st.d < 0) and the TSI is above the oversold level (-0.241).
- Long Exit: When the SuperTrend indicates an upward trend (st.d > 0) and the TSI is below the overbought level (0.241).
- Short Entry: When the SuperTrend indicates an upward trend (st.d > 0) and the TSI is below the overbought level (0.241).
- Short Exit: When the SuperTrend indicates a downward trend (st.d < 0) and the TSI is above the oversold level (-0.241).

█ Trade Direction
The strategy allows users to select the trade direction through the `tradeDirection` input. The options are:
- Both: Enables both long and short trades.
- Long: Enables only long trades.
- Short: Enables only short trades.

█ Default Settings
- TSI Length: 64
- SuperTrend Length: 10
- SuperTrend Factor: 3.0
- Trade Direction: Both
- Take Profit (%): 30.0
- Stop Loss (%): 20.0

Impact of Default Settings
- TSI Length: A longer TSI period smooths out noise but may lag in identifying trends. A shorter period is more responsive but can generate false signals.
- SuperTrend Length: A shorter length provides quicker signals but can be prone to whipsaws. A longer length is more reliable but may delay entries and exits.
- SuperTrend Factor: A higher factor increases the distance of the SuperTrend from the price, reducing sensitivity to minor price fluctuations.
- Trade Direction: Allows flexibility in trading strategies by enabling both long and short trades based on market conditions.
- Take Profit and Stop Loss: These settings manage risk by automatically closing trades at predefined profit or loss levels. Higher percentages provide larger potential gains but also higher risk.
backtestingpresenttradingsupertrendtradingstrategyTrend AnalysisTrue Strength Index (TSI)

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

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


Watch patiently/ then trade
또한 다음에서도:

면책사항