Yes sir, alertcondition() is the standard way to create alert conditions in a custom TradingView indicator.
It does not send alerts by itself. Instead, it tells TradingView which conditions should be available when you create an alert.
For example, suppose your indicator generates Buy and Sell signals like this:
Now you can create alert conditions like this:
Now save the script and add it to your chart.
Then follow these steps:
-Step 1:
Click the “Create Alert” button in TradingView.

-Step 2:
In the Condition dropdown, select your custom indicator.

-Step 3:
You will now see the alert conditions that you created using alertcondition(), such as:
-Buy Signal
-Sell Signal

-Step 4:
Select the condition you want, configure the notification settings, and click “Create”.

That’s it.
Whenever buySignal becomes true, the “Buy Signal” alert can be triggered.
Whenever sellSignal becomes true, the “Sell Signal” alert can be triggered.
One important thing to remember is that alertcondition() only defines the alert conditions. It does not send alerts automatically.
You still need to create the alert from the TradingView interface after adding the indicator to your chart.
This is the recommended approach when you are building custom indicators and want users to create TradingView alerts based on your Buy and Sell conditions.