OPEN-SOURCE SCRIPT

4Vietnamese 3x Supertrend

This strategy attempts to capture long positions in the Vietnamese stock market using a combination of three Supertrend indicators and additional filters. It utilizes pyramiding to enter up to three long positions with a 33.33% allocation each.

Key Elements:
Supertrend Indicators: Three Supertrend indicators are used with different lengths and multipliers to identify potential trend changes.

Entry Conditions:
The strategy looks for a downtrend on the slowest Supertrend (Supertrend3) followed by uptrends on the medium (Supertrend2) and fast (Supertrend1) Supertrends.
Alternatively, if Supertrend3 is still downtrending, but Supertrend1 is downtrending and a significant previous high (highestGreen) exists, an entry signal is generated.
An optional filter allows using the highest of the last two red candles for highestGreen calculation.

Entry Stop Loss:
An optional stop loss can be set based on the entry price of previous long positions, preventing further losses if the price falls below entry prices.

Exit Conditions:
Three exit options are available:
- All Downtrend Exit: Close all positions if all Supertrends turn uptrend and a bearish candlestick pattern (close price lower than open price) is formed.
- Average Price in Loss Exit: Close all positions if the average entry price of open positions is higher than the current closing price (indicating a loss).
- All Positions in Loss Exit: Close all positions if any of the following conditions are met:
A single open position exists, and its entry price is higher than the current close price.
Two open positions exist, and their entry prices are both higher than the current close price.
Three open positions exist, and their entry prices are all higher than the current close price.

Pyramiding: The strategy allows entering up to three long positions with a fixed allocation of 33.33% each.

Customization Options:
The strategy provides various input parameters to customize its behavior:
Supertrend lengths and multipliers for each indicator.
Option to use the highest of the last two red candles for highestGreen calculation.
Enabling/disabling Entry Stop Loss and different exit conditions.

Further Enhancements:
Explore additional entry and exit filters to refine trade signals.
Consider incorporating risk management techniques like position sizing and trailing stops.
Backtest the strategy with historical data to evaluate its effectiveness and identify potential areas for improvement.
supertrendTrend Analysis

Script de código aberto

No verdadeiro espírito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam compreendê-lo e analisá-lo. Parabéns ao autor! Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Quer usar esse script no gráfico?


MikeJSaylor @ telegram
Também em:

Aviso legal