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

howto disable order entry with Add On

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

    howto disable order entry with Add On

    is it possible to develop an NT8 addon which can prevent the entry of new entry orders if the daily profit limit or loss limit is reached. All entries from Strategy, ChartTrader, DOM ... should be rejected

    #2
    Hello Klaus Hengher,
    Thanks for your post.

    There is not a supported way to prevent manual order submissions through NinjaScript, but you can add logic to a NinjaScript strategy so that strategy will cease firing orders after the Account's realized PnL reaches a certain point.

    This can be done by checking the PnL, and then setting a bool that controls your trading logic so the trades no longer fire.

    You can see the Unrealized PnL on the account with OnAccountItemUpdate(): https://ninjatrader.com/support/help...itemupdate.htm

    Please see the following forum post for some examples of how to accomplish this.
    Hello, I've updated the DailyLossLimit and DailyLosLimitMultiTrade examples that were posted on the forum for NinjaTrader 7 for NinjaTrader 8. These are often requested and I felt they are good examples to have for NT8. DailyLossLimitExample_NT7 - http://ninjatrader.com/support/forum...241#post451241 (http://ninjatrader
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      Within strategy I know how to do this, but I need this functionality for all order to specified account ( manual or automatic) , disable trading if daily stop loss or profit target for all trades is hit.
      Any idea how to implement this functionality?

      Comment


        #4
        Klaus,

        There is not a supported way to prevent manual order submissions through NinjaScript. This means I would not be able to provide any assistance on implementing that functionality.

        What I can do is submit a vote on your behalf to the the feature request for this, so that it may be added in a future release. The internal tracking number for this feature request is SFT-3344. Please reference this internal tracking number if you ever have questions regarding this feature request.

        When a feature request is implemented, you'll find it in the release notes:


        Josh G.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by love2code2trade, 04-17-2024, 01:45 PM
        4 responses
        37 views
        0 likes
        Last Post love2code2trade  
        Started by alifarahani, Today, 09:40 AM
        2 responses
        13 views
        0 likes
        Last Post alifarahani  
        Started by junkone, Today, 11:37 AM
        3 responses
        16 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by pickmyonlineclass, Today, 12:23 PM
        0 responses
        3 views
        0 likes
        Last Post pickmyonlineclass  
        Started by frankthearm, Yesterday, 09:08 AM
        12 responses
        44 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Working...
        X