Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Can you add a Quantity Selector Field to the Custom Orders Hotkeys window ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Can you add a Quantity Selector Field to the Custom Orders Hotkeys window ?

    Can you add a Quantity Selector Field to the Custom Orders Hotkeys window (from Control Center > Tools > Hotkeys > Order Entry > Custom Order) ?

    Click image for larger version  Name:	hotkeys_customorderdialog.png Views:	5 Size:	23.4 KB ID:	1189331

    For example, adding as point 6 the quantity selector, then the hotkey as point 7 then the Ok button as point 8.

    From

    Trading with Hot Keys
    https://ninjatrader.com/support/help...h_hot_keys.htm

    Under this section How to create custom order actions

    I'd like to preset custom default quantity of custom Hotkeys.

    What was the rational for not adding the quantity selector in the Custom order hotkeys window?

    Is there another NT8 way to achieve the same goal already built in? if not can you give guidelines to program it into the Custom Order window (the exact same code from ChartTrader window and the process to implement to add it to the Custom Order window)? Thanks

    #2
    Hello PaulMohn,

    It may be possible to add that by using NinjaScript however that wouldn't internally be wired to anything so for the given tool I would need to put in a feature request.

    I believe the reason there is no quantity specified is that the order hot keys are intended to be used with an order placement tool like the ChartTrader which has a quantity selector. That makes the hotkey variable and the quantity is easily editable while using the tool. I will put in a feature request to have an optional pre determined quantity.

    JesseNinjaTrader Customer Service

    Comment


      #3
      Hello Jesse and thanks for the info and feature request.

      I found a similar feature request (7 years old)
      previous post related
      https://ninjatrader.com/support/foru...514#post695514

      I'd still be interested in the Quantity Selector code to try and produce the script for a custom hotkey if the feature won't be added rapidly.
      For example, I'd like to program a simple Buy Market order with preset quantity of 3 contracts.
      Can you please detail the process to follow to do so? Thanks

      Comment


        #4
        Hello PaulMohn,

        You could use the QuantityUpDown WPF control for the quantity selector in a custom area. There are a few samples of that control in the following links.



        You could create a indicator that observes key events from the ChartControl and then utilize either the chart traders quantity control or create your own. In any case you won't be able to use the menu you had first shown for that purpose, the list of custom events don't know about custom properties to use them.

        The easiest solution would be to create a script which has keyboard handing and then hard code the quantity for each various keyboard command. Rather than using the GUI to update the keys/quantities you would edit that in the script.

        There is a sample of using a text box in the chart in the following link, if you plan to do any keyboard events you would need to use a similar approach to handle those keys to avoid the instrument selector. https://ninjatrader.com/support/foru...PreviewKeyDown
        JesseNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Jesse View Post
          Hello PaulMohn,

          You could use the QuantityUpDown WPF control for the quantity selector in a custom area. There are a few samples of that control in the following links.



          You could create a indicator that observes key events from the ChartControl and then utilize either the chart traders quantity control or create your own. In any case you won't be able to use the menu you had first shown for that purpose, the list of custom events don't know about custom properties to use them.

          The easiest solution would be to create a script which has keyboard handing and then hard code the quantity for each various keyboard command. Rather than using the GUI to update the keys/quantities you would edit that in the script.

          There is a sample of using a text box in the chart in the following link, if you plan to do any keyboard events you would need to use a similar approach to handle those keys to avoid the instrument selector. https://ninjatrader.com/support/foru...PreviewKeyDown
          Hi Jessen,

          I want to tweak PaulMohn's "BuyMktSellMarket" indicator to trigger an ATM (where the quantity, TP, SL, etc would have been setup) ... is this feasible ? If Yes, what are the next steps in this regard.

          omololu

          Comment


            #6
            Hello omololu,

            An ATM needs manually configured before hand to set up a template. If you have a template you wanted to use then you could call an ATM function from the indicator/strategy. An indicator would need to use the addon frameworks StartAtmStrategy method: https://ninjatrader.com/support/help...tmstrategy.htm
            JesseNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by samish18, Today, 01:01 PM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_LuisH  
            Started by WHICKED, Today, 12:56 PM
            1 response
            8 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by cre8able, Today, 01:16 PM
            0 responses
            3 views
            0 likes
            Last Post cre8able  
            Started by chbruno, 04-24-2024, 04:10 PM
            2 responses
            47 views
            0 likes
            Last Post chbruno
            by chbruno
             
            Started by WHICKED, Today, 12:45 PM
            1 response
            11 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Working...
            X