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

نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الرمز في المنشور يخضع لقواعد‎‎قوانين الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟

إخلاء المسؤولية