Many users in our community have requested a feature to add alerts to certain indicators. However, NinjaTrader 8 has built-in capabilities to alert you or even fully automate your strategy, so you don’t have to wake up!
In this tutorial, we'll walk you through creating a simple signal alert using NinjaTrader's Strategy Builder. By the end, you’ll be ready to dive into Strategy Automation and become an Algo Trading Wizard!
Scenario
We’ll use the ALMA (Arnaud Legoux Moving Average) indicator set to a length of 100. When the price crosses above or below ALMA 100, two things will happen:- An alert will be triggered with a sound.
- The chart background will be highlighted.
Steps to Create Your First Strategy Alert
(1) Open Strategy Builder: From the NinjaTrader 8 Control Center, click on New -> Strategy Builder.
(2) Welcome Screen: Keep New Strategy selected, and click Next.
(3) General Screen: Add a name and description for your strategy, then click Next.
(4) Default Properties Screen: Keep the default settings and click Next.
(5) Additional Data Screen: Skip this screen for now and click Next.
(6) Input and Variable Screen: Skip this screen as well and click Next.
(7) (8) Conditions and Actions Screen: Here, we'll create two sets of conditions and actions.
Set 1: Long Signal
7.1. Click Add in the upper condition section.
7.2. From the left panel under Price, select Close Price.
7.3. In the middle, select Cross Above.
7.4. From the left panel under Indicators, select ALMA, and set the Window to 100.
7.5. Click OK.
7.6. Click Add in the "Do the following" section.
7.7. Under Drawing, select Set Background Color, choose a color, and click OK.
7.8. Click Add again in the "Do the following" section.
7.9. Under Misc, select Alert, choose a sound file by clicking on Filename, write a message for the alert, and click OK.
Set 2: Short Signal
8.1. Click on the plus icon next to the Set 1 tab to create Set 2.
8.2. Click Add in the upper condition section.
8.3. From the left panel under Price, select Close Price.
8.4. In the middle, select Cross Below.
8.5. From the left panel under Indicators, select ALMA, and set the Window to 100.
8.6. Click OK.
8.7. Click Add in the "Do the following" section.
8.8. Under Drawing, select Set Background Color, choose a color, and click OK.
8.9. Click Add again in the "Do the following" section.
8.10. Under Misc, select Alert, choose a sound file by clicking on Filename, write a message for the alert, and click OK.
(9) Stops and Targets: Click Next for now. You can explore these options later.
(10) Finish Screen: Click Finish.
Congratulations!
You've created your first automated strategy alert!
Putting Your Strategy into Action
(1) Activate Your Strategy: On your chart, right-click and select Strategies.
(2) Select Your Strategy: In the left panel, find the strategy you just created and double-click on it.
(3) Enable the Strategy: In the right panel, check the Enabled box, click Apply, and then OK.
You will now see signals highlighted on your screen for historical data. To see live alerts, open the Alert Log from your NT8 Control Center by clicking New -> Alert Log. This is where live alerts will be recorded.
I hope you enjoyed this tutorial and see the potential of NinjaTrader 8’s Strategy Builder. Happy trading!