ProfitSniper — OCO Order Hotkeys Script

This Indicator is a 1st modification of the ProfitChaseStopTrailIndicatorExample_NT8 from NinjaTrader_ChelseaB previously shared

and NinjaTrader_Jim's

Combined with the 2nd PreviewKeyTest share

With kind help from Ninjatrader_Jesse and Ninjatrader_Chelsea from thread for the QuantitySelector feature

The script s also heavily inspired by excellent Buttons orders Script TickHunter from excellent RFrosty.
And a follow-script from previous share BuyMktSellMktHotkeysQS.

The Script Use:

Orders Entry:

The basic script executes BuyMkt and SellMkt orders with the Numpad1 and Numpad2 Hotkeys keystrokes.

  • A BuyMkt order is submitted when pressing the Numpad 1 key (while the mouse cursor is over the Chart Window and the Chart window is selected/active).
  • A SellMkt order is submitted when pressing the Numpad 2 key (while cursor is over the Chart Window and the Chart window is selected/active).

Quantity Selector Keys:

  • The Main Keyboard and the Numeric Pad (0-9) Keys to input any size of your choice in the field of the new Quantity Selector located in the in the Toolbar.
  • The Delete Key and the Backspace Key to revert the Quantity Selector size back to zero.

Target & StopLoss Orders Movement Keys:

Target Orders Movement:

  • The NumPad7 Key Keystrokes move the Target Orders Away from Entry
  • The Ctrl Key + NumPad7 Key Keystrokes move the Target Orders back towards Entry

StopLoss Orders Movement:

  • The NumPad4 Key Keystrokes Move The StopLoss Orders Towards Entry
  • The Ctrl Key + NumPad4 Key Keystrokes Move The StopLoss Orders Away From Entry

Upcoming Functions (more upon request if feasible):

  • Select Your Custom Hotkeys with the Drop Down Menu
  • Multiple Orders Function
  • Orders Rejections Function
  • Auto-Populate QuantitySelector Field

How To Import:

  1. Just simply import the indicator: Control Center > Tools > Import > NinjaScript Add-On > locate "ProfitSniper.zip"
  2. Then load it on your chart: Right Click > Indicator or Ctrl+I > Available pane > Select "ProfitSniper.zip"

To Set Size and Place Trades:

  1. Put your Cursor into the Quantitiy Selector Field, and type in your size (using the 0-9 Keys from main keyboard and/or Numeric pad)
  2. Then activate the Numeric Pad (press the Num Lock key)
  3. Then press NumPad1 key to enter a Market Long trade order/then press the NumPad2 Key to enter a Market Sell order.

Note About The Size:

You can customize the size of your trades by type any size number in the Quantity Selector field located in the Toolbar.

To change the size of your BuyMkt Order hotkey, simply type any size number of your choice in the Quantity Selector field located in the toolbar.
Then to place the trade with your new custom size, simply get the mouse focus out of the Quantity Selector field and back to the chart and activate the main window of the chart (click on it), then hit the Numpad1 Key (BuyMkt Order).

To change the size of your SellMkt Order hotkey, simply type any size number of your choice in the Quantity Selector field located in the toolbar.
Then to place the trade with your new custom size, simply get the mouse focus out of the Quantity Selector field and back to the chart and activate the main window of the chart (click on it), then hit the Numpad2 Key (SellMkt Order).

Created By PaulMohn
NinjaTrader Version 8
File Size 5.0 KB
Create Date(s) 05/17/2022
# of Downloads 113

Importing to NinjaTrader 8 is Easy!

To import your 3rd party app or add-on to NinjaTrader, simply follow these 3 steps:

  1. Download the app or add-on file to your desktop
  2. From the NinjaTrader Control Center window, select the menu Tools > Import > NinjaScript Add-On…
  3. Select the downloaded file from your desktop

Questions?

Visit the NinjaScript File Sharing discussion in the NinjaTrader user forum to interact with fellow traders and the NinjaTrader support team.