OPEN-SOURCE SCRIPT

Multi-Condition Alert Script

A Grok written Script/Alert I use for triggering a Sell on my DCA Bots. Sends an alert using an OR operator on 3 separate conditions. Any of the three conditions can trigger an alert based on user settings.

Written in Pine 5, but should convert to 6 ok.

The three conditions are:

1. Moving Average Convergence - can select SMA or EMA and the fast and slow values. Script will send an alert based on the distance between the 2 values converging by a user selected percentage (E.G. alert when fast MA and slow MA gap closes by x%)

2. Counts Candles - Select Red or Green. I use it to count 3 consecutive red candles with a minimum 0.1 percent size. User can select number of candles and minimum percentage size to be counted. Red or green use positive values for the percentage in the dialogue. The script normalizes it.

3. RSI - user can choose period, value and crossing up or down as well as greater than or less than values.

If any of the three conditions, based on the user's selections becomes true - then an alert is sent.

The script begins a cycle when the fast MA crosses up the slow MA value. Timeframes are user defined for the alerts. I usually use 3M, 5M and 15M depending on the bot, but any value should work.

For candles, it resets its counter each time a condition is met (E.G. 3 consecutive red will start counting again at 0 with next candle)

In theory it would work counting green candles going up, but I have only used it to trigger sell events. And remember it starts its cycle when fast MA crosses up slow MA.

Use at your own risk. I provide no warranties or guarantees.

Feel free to use or modify for your own personal use. Not for sale or resale.




Bands and ChannelsCandlestick analysisChart patterns

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