OPEN-SOURCE SCRIPT

Auto Trendlines with Break Alerts

635
Identify the two most recent significant swing highs and swing lows based on a customizable pivot length.

Draw trendlines extending from these points.

Provide an optional visual signal (a small diamond on the chart) and a alertcondition for sound/push notifications when a trendline is broken.
Configure: Once the indicator is on your chart, you can click on the gear icon (⚙️) next to its name to adjust the settings. You will see a checkbox to enable/disable alerts and a slider to change the pivot length.

Configuring Alerts in TradingView

The alertcondition lines in the code allow you to set up official TradingView alerts for sound and push notifications.

Create an Alert: Click the clock icon (⏰) on the right-side toolbar of your TradingView chart.

Set the Condition: In the "Condition" field, select the name of the indicator: "Auto Trendlines with Break Alerts".

Choose the Alert Type: A second dropdown will appear. Select either "High Trendline Broken" or "Low Trendline Broken" to specify which break you want to be alerted for.

Select Notification Options: In the "Notifications" section, you can check the boxes for "Play sound," "Send email," "Send push notification," etc.

Create the Alert: Click "Create" to save your alert.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.