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

Make more precise limit orders with automated trading ninjatrader 8

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

    Make more precise limit orders with automated trading ninjatrader 8

    As it is (as far as I know) you can only place a market order with automated trading. Is there a way to create a limit order at the moment an alert is triggered instead of a market order? Market orders are so not precise and given the close tolerances in automated trading (I'm doing) my spreads are usually too wide. Thanks in advance for your answer.

    #2
    Hello wbayne333,

    Thank you for your post.

    A NinjaScript strategy is able to place Market orders, Limit orders, Market-If-Touched orders, Stop-Market orders, Stop-Limit orders, and more. Please see the help guide documentation below for more information about the different order types you are able to use.

    Managed approach - https://ninjatrader.com/support/help...d_approach.htm

    To place a Limit order at the same time an alert is triggered instead of a Market order, you could create a condition in your script that when it becomes true will trigger an Alert and place a Limit order using EnterLongLimit/EnterShortLimit.

    This could be accomplished using the Strategy Builder. In the Strategy Builder, you would navigate to the Conditions and Actions screen, create a condition for your Alert and Limit order in the Conditions section, then set an Alert action followed by calling EnterLongLimit/EnterShortLimit. After setting this up in the Strategy Builder you could view the code to accomplish this by clicking the 'View code' button in the Strategy Builder.

    See the help guide documentation below for more information.

    Strategy Builder Conditions - https://ninjatrader.com/support/help...on_builder.htm
    Strategy Builder Actions - https://ninjatrader.com/support/help...eActionsWindow

    Also, here is a link to our publicly available training videos, 'Strategy Builder 301' and 'NinjaScript Editor 401', for you to view at your own convenience.

    Strategy Builder 301 — https://www.youtube.com/watch?v=_KQF2Sv27oE&t=13s

    NinjaScript Editor 401 - https://youtu.be/H7aDpWoWUQs?list=PL...We0Nf&index=14

    Please let us know if we may assist further.
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by usazencort, Today, 01:16 AM
    0 responses
    1 view
    0 likes
    Last Post usazencort  
    Started by kaywai, 09-01-2023, 08:44 PM
    5 responses
    603 views
    0 likes
    Last Post NinjaTrader_Jason  
    Started by xiinteractive, 04-09-2024, 08:08 AM
    6 responses
    22 views
    0 likes
    Last Post xiinteractive  
    Started by Pattontje, Yesterday, 02:10 PM
    2 responses
    21 views
    0 likes
    Last Post Pattontje  
    Started by flybuzz, 04-21-2024, 04:07 PM
    17 responses
    230 views
    0 likes
    Last Post TradingLoss  
    Working...
    X