Alerts

Overview

Lune Automated Strategies support a fully configurable alert system within TradingView, giving users real-time notifications for entries, exits, and partial exits. These alerts can also be used in combination with Lune Auto Trader to enable automated trade execution based on signal events.

The alert system allows users to define custom messages, select alert types, and configure how TradingView should handle these notifications.

If you're using Lune Auto Trader, alerts generated through this system can be used to automate your trades. Refer to this guide to get started with Lune Auto Trader automation: Automate TradingView Strategies Guide

How Alerts Work

The alert system operates by using TradingView’s built-in alert() function. When you create an alert, you must ensure that the Condition is set to:

Any alert() function call

This setting tells TradingView to listen to the alerts embedded in the Lune strategy and trigger the appropriate alert messages.

Alert Settings

You can toggle alerts for the following event types:

Alert Type
Description

Entry Alerts

Receive alerts when a long or short trade entry is triggered.

Exit Alerts

Get notified when a position is closed based on an exit condition.

Partial Exit Alerts

Alerts are triggered when partial take profit levels are reached.

Each alert type can be independently enabled or disabled for long and short trades.

Custom Alert Messages

Lune allows users to define personalized alert messages for each trade event type. These messages will be included in the alert notification sent by TradingView and can be customized in the strategy settings.

Alert Message Field
Purpose

Entry Long Alert Message

Triggered when a long entry is signaled.

Entry Short Alert Message

Triggered when a short entry is signaled.

Exit Long Alert Message

Triggered when a long trade exits.

Exit Short Alert Message

Triggered when a short trade exits.

Long Partial Exit Message

Triggered on partial TP level for long trades.

Short Partial Exit Message

Triggered on partial TP level for short trades.

These messages are ideal for use with webhook integrations, mobile push notifications, or automated systems like Lune Auto Trader.

Best Practices

  • For Automation: Make sure to copy your custom alert message into the alert box when creating an alert in TradingView.

  • Webhook Use: These messages can include JSON for integrations with third-party bots and systems.

  • Always Select Any alert() function call in the Condition dropdown when creating an alert.


How to Set Up Alerts in TradingView

  1. Open the chart with your configured Lune Automated Strategy.

  1. Open your strategies settings and navigate to the Alert Configuration section. Ensure that all of the alerts are enabled. Fill out the text boxes with your desired alert message.

  1. Create a TradingView alert, set the condition to "alert() function calls only". Customize your settings and notifications.

  1. Click Create. Thats it!

Last updated

Was this helpful?