List view
Overview
Overview
Price Data
Price Data
Get Started
Â
Create Your First Indicator
Â
Now, let's create an indicator that displays the EMA and Supertrend indicators on the main chart. This indicator will also show their respective buy and sell signals, along with corresponding alerts.
Â
Create an Indicator
Open the Pineify Builder and click the "Create" button on the homepage. In the pop-up dialog box, choose the type of indicator you want to create. Then, select the corresponding blank template from the options provided.
Â
Â
Â
An empty indicator has now been created. Let's proceed step by step to build this indicator 🥳.
Â
Add input
Â
On the editor page, you'll find Input Elements on the right side. There are 13 different input types available, as illustrated below.
Â
Â
Inputs allow indicators to accept user-modifiable values that can be adjusted in the indicator settings. This feature makes it much easier to change parameters for your indicators in TradingView without editing any code.
Â
Let's create two Number-type inputs for Slow EMA Length and Fast EMA Length, and one Decimal-type input for the Supertrend Factor. You can see the setup in the screen below.
- Slow EMA Length
- Fast EMA Length
- Supertrend Factor
Â
You can create the input here, or when creating the indicator, select "Use Input" to quickly create it.
Note: The key difference between Number and Decimal inputs is that Number accepts only integers, while Decimal allows both integers and decimal fractions.
Â
After completing the setup, you'll see these three inputs in your Inputs panel.
Â
Add Indicator
For our indicator, we'll create three components: a Slow EMA, a Fast EMA, and a Supertrend.
In the dialog box, simply enter the indicator names and link the parameters to the corresponding Inputs we've just created. Then, choose the plot style in the Plots section, where you can adjust features like the color and width of the line.
- Slow EMA
For the Length parameter, we can use either a fixed value or an Input. To make it easier to adjust the value in TradingView settings, we'll enable "Use Input" and select the "Slow EMA Length" we just created.
- Fast EMA
Similar to the Slow EMA, we'll select the "Fast EMA Length" as the parameter. We'll also set a different color for the line to distinguish it on the chart.
- Supertrend
Search for and add the Supertrend indicator. Use the "Supertrend Factor" Input as the parameter for the Factor. Keep the default plot properties.
Â
After completing the setup, you'll see these three indicators added to your Indicators panel.
Â
Now, click the "Copy Pine Script" button in the top right corner. Then, create a new indicator in TradingView and paste the copied code. You'll see the default plots of these three indicators appear on the main chart.
Â
If you find the chart too cluttered, consider setting the Supertrend line to transparent while retaining only its background color.
Â
Add Condition
A condition evaluates whether an indicator's output, a specific circumstance, or other candle-based values meet a certain criteria—such as exceeding or falling below a particular threshold. It yields a true or false result at the conclusion of each candle.
Â
Now, let's create two conditions: EMA Buy Signal and EMA Sell Signal.
- EMA Buy Signal: This condition is met when the Fast EMA crosses above the Slow EMA.
- EMA Sell Signal: This condition is met when the Fast EMA crosses below the Slow EMA.
Â
Next, click on "Condition" in the right panel to create a new condition. In the Condition Editor, set up the conditions as follows:
- EMA Buy Signal
- EMA Sell Signal
Â
After setting up these conditions, you'll find them added to your Conditions panel.
Â
Now, let's visualize the buy and sell signals on the chart.
Â
Add Plot
All chart visualizations can be accomplished through Plots. In this section, we'll mark four signals on the chart: EMA Buy Signal, EMA Sell Signal, Supertrend Buy Signal, and Supertrend Sell Signal.
We'll use character plots to display symbols on the chart. For buy signals, we'll use a green â–², and for sell signals, a red â–¼. These character plots effectively visualize trading signals.
- EMA Buy Signal Plot
- The Location property determines where the indicator will be plotted on the chart. In this case, we'll consistently place buy signals below the price bar and sell signals above it.
- The Data property specifies the condition for plotting. The selected value is converted to true or false. A true value results in the plot being drawn on that bar, while a false value means no plot will appear.
- The Text property specifies the displayed text. Here, we'll use the indicator names to distinguish between buy and sell signals from each indicator.
- EMA Sell Signal Plot
- Supertrend Buy Signal Plot
- Supertrend Sell Signal Plot
Â
After completing the setup, these four plots will appear in our Plots panel.
Â
Now, the buy and sell signal points are clearly visible on the main chart.
Â
Let's now add alerts for buy and sell signals. This will enable us to receive real-time notifications via email and mobile apps.
Â
Add Alert
We will now create four alerts: EMA Buy Alert, EMA Sell Alert, Supertrend Buy Alert, and Supertrend Sell Alert. For each alert, we need to select the corresponding conditions and specify the alert message content.
For alert messages, you can search for predefined messages in the search box and incorporate placeholders into your custom messages.
Let's look at the configuration of the EMA Buy Alert as an example:
Â
Â
After completing the setup, you'll see these four alerts added to your Alerts panel.
Â
We have now successfully created an indicator that displays both the EMA and Supertrend indicators on the main chart. This indicator also showcases their respective buy and sell signals, complete with corresponding alerts.
Next, paste the latest code into TradingView and take the final step: configure the alert in TradingView.
Â
Add Alerts on TradingView
Click the "Create Alert" button in the TradingView toolbar. Then, select the indicator you just created and choose "Any alert() function call" for the alert condition, as shown in the figure below.
Â
After creating the alert, you can view active alerts and their corresponding logs in the Alerts panel on the right side of the TradingView interface.
Â
Now, you can receive real-time notifications via email and mobile apps when the conditions are met.
🥳 Congratulations! You've successfully created your first indicator. You can now build more complex indicators by combining multiple indicators and conditions.
Pineify's capabilities extend far beyond what we've explored here. We're excited to see how you'll use it to build your own unique trading indicators!
Â
In this guide, we've shown you how to create a customizable trading indicator using Pineify. By combining EMA and Supertrend indicators with buy/sell signals and alerts, you can enhance your trading strategy. Pineify's interface makes it easy to build indicators without complex coding, allowing you to focus on trading insights. With adjustable parameters, signal visualization, and notifications, you now have a powerful tool for market analysis. Pineify's versatility enables you to create sophisticated, personalized indicators. Ready to elevate your trading? Start with Pineify today!
Â