
Introduction:
NinjaView is a versatile Python application that allows you to interact with NinjaTrader software through webhooks and automate trading actions. It provides integration with ngrok for creating secure tunnels to expose your local server to the internet. This guide will walk you through the various features and setup procedures.
Features
- A user-friendly interface with system tray icons.
- Exposing local servers through ngrok for webhooks.
- IP Restriction for security
- Flexible Order Types
- Logging and Error Handling
- Run Webhook On Startup
IP Restriction
The server uses an IP restriction feature to ensure that only authorized servers can send alerts. The enabling of Tradingview to access the server is not neccessary for the “Auto-Trade” feature but is used for the “Webhook” feature. Authorized IP’s :
TradingView Webhooks Support Website (Click Here)
["52.89.214.238", "34.212.75.30", "54.218.53.128", "52.32.178.7", "192.168.1.1", "127.0.0.1"]
Order Types
The server supports multiple types of TradingView alerts and converts them into appropriate NinjaTrader 8 order instructions.
- Trade Copier: Copy trades to multiple accounts.
- Simple Market Long: Place a market buy order.
- Simple Market Short: Place a market sell order.
- Simple Close All Positions: Close all existing positions for a specific asset.
- Long with Limit Order: Place a buy limit order.
- Short with Limit Order: Place a sell limit order.
- Long with Stop Market Order: Place a buy stop market order.
- Short with Stop Market Order: Place a sell stop market order.
- Long with Stop Limit Order: Place a buy stop limit order.
- Short with Stop Limit Order: Place a sell stop limit order.
- OCO Market Order Long: Place a One-Cancels-the-Other market buy order.
- OCO Market Order Short: Place a One-Cancels-the-Other market sell order.
- OCO Limit Order Long: Currently Unsupported By NinjaTrader ATI.
- OCO Limit Order Short: Currently Unsupported By NinjaTrader ATI.
- ATM Market Order Long: Place a ATM market buy order.
- ATM Market Order Short: Place a ATM market sell order.
- ATM Limit Order Long: Place a ATM Limit buy order.
- ATM Limit Order Short: Place a ATM Limit sell order.
- Cancel/Change OCO Long TP and SL: Cancel or adjust the take profit (TP) and stop loss (SL) for a long OCO order.
- Cancel/Change OCO Short TP and SL: Cancel or adjust the take profit (TP) and stop loss (SL) for a short OCO order.
- Cancel All OCO Brackets: Cancel all take profits (TPs) and stop losses (SLs) for OCO orders.
Requirements:
NinjaTrader software installed and running on your computer.
An ngrok account (if you plan to use ngrok for webhooks).
Activate the Application:
When you run NinjaView for the first time, it will prompt you to activate the application.
You will need to enter an activation key provided to you, if an activation key has not been provided.
Please email support@ninja-view.comm with your Serial.
Configure ngrok:
Create an ngrok account by visiting the ngrok website.
If using a “Paid” Ngrok Account. Obtain your ngrok API token.
To load your ngrok account details, open the config.txt file and add the following:
ngrokAUTHTOKEN=Default(Default is for free ngrok. For paid ngrok you would include your actual AUTHTOKEN) ngrokDOMAIN=example-ngrok-domain.ngrok-free.app ngrokLOCATION=C:UsersYOURUSERNAMEDesktopNgrok.exe
Application Buttons:
The NinjaView application includes several buttons in its system tray menu:
- Activated/Not Activated: Indicates whether the application is activated.
- Start Extension: Starts the NinjaView server for webhook integration.
- Start Ngrok Webhook: Starts ngrok to expose the server to the internet.
- Shutdown: Closes the application.
Configuring config.txt
The config.txt file in the application folder allows you to configure various settings. Here are the variables you can include:
- activationCode=
00000000
- ngrokAUTHTOKEN=
AUTHTOKEN
- ngrokDOMAIN=
Your ngrok domain ("myapp.ngrok.io").
- ngrokLOCATION=
File path to the ngrok executable.
- userEmail=
Your email address used for NinjaView access.
(ngrokAUTHTOKEN=Default is for free ngrok. For paid ngrok you would include your actual AUTHTOKEN)
Run NinjaView/Ngrok On Startup
Create a NinjaView shortcut on your Desktop. Press the Windows logo key + R, type shell:startup, then select OK. This opens the Startup folder. Copy the NinjaView shortcut to your “Startup” Folder. Right-click the NinjaView shortcut > Properties.
- “C:pathtoyourNinjaView.exe”
--start-ngrok
Startup Folder
Edit the “Target”

Troubleshooting:
Errors and other important information are logged for better traceability and debugging. If you encounter any issues with NinjaView, refer to the application logs (e.g., logfile.txt) for error messages and helpful information.
Contact
For any questions or issues, please contact the development team.