OPEN-SOURCE SCRIPT

30-Minute Candle Strategy

30-Minute Candle Trading Strategy
This strategy works on a 30-minute candle timeframe. When a new 30-minute candle opens, the following actions will take place based on the previous 30-minute candle's closing price:

Buy Trade Setup:

If the market opens above the previous 30-minute candle's closing price, a buy trade will be executed immediately at the market price.
The stop-loss will be set at the previous 30-minute candle's closing price.
There will be no fixed target.
The trade will be closed 1 minute before the current 30-minute candle closes, regardless of profit or loss.
Sell Trade Setup:

If a buy trade hits the stop-loss and the market moves below the previous 30-minute candle's closing price, a sell trade will be executed immediately at the market price.
The stop-loss for the sell trade will also be set at the previous 30-minute candle's closing price.
There will be no fixed target.
The trade will be closed 1 minute before the current 30-minute candle closes, regardless of profit or loss.
Procedure:

This process will repeat for every 30-minute candle.
If the market crosses the previous 30-minute candle's closing price to the upside, a buy trade will be executed, and the stop-loss will be set at the previous candle's closing price.
If the market crosses the previous 30-minute candle's closing price to the downside, a sell trade will be executed, and the stop-loss will also be set at the previous candle's closing price.
Each trade will be closed 1 minute before the current candle closes.
Key Points:

This strategy applies to every new 30-minute candle.
The stop-loss will always be based on the previous 30-minute candle's closing price.
If a stop-loss is hit, the strategy will automatically switch to the opposite trade (buy to sell or sell to buy) based on market movement crossing the previous candle's closing price.
This is a repetitive and systematic approach to trading, ensuring the rules are followed for every 30-minute candle.
Cycles

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?

Aviso legal