Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

disable trades based on pnl

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

    disable trades based on pnl

    Hi, I current have written an addon for nt8 and would like to add the following functionality:

    1. If my realized pnl for the day is -$300 disabled all future orders
    2. Limit the total number of contracts to a specific number (i.e. 2 contracts)

    Is this possible using an addon?

    #2
    Hello trader252,

    Thank you for the post.

    This would be possible depending on the scope you are referring to.

    You could disable the addon from trading or the placing of orders through its logic, but there is no way to globally control the platform to prevent other tools from placing orders. If you instead mean to control this globally this would be something you would need to watch yourself and then just stop trading if you shouldn't be trading at that point. An automated script could use the PnL information to prevent its self from trading in its logic, you can also do this in an addons logic for the trades it places.

    The limit to the contracts would also be up to your logic and your tool, this is not something you could globally control but you could certainly limit your add-on using its code.



    I look forward to being of further assistance.

    Comment


      #3
      Hi Jesse,

      Can you provide some insight on what the automated script would look like that use the PnL information and how to reference it within an existing strategy code? a sample would be great. thanks in advance

      Comment


        #4
        Hello duoshark,

        Welcome to the NinjaTrader support forum.

        You can find reference samples for different trading concepts in the following link: https://ninjatrader.com/support/help...ce_samples.htm
        The strategy section has some samples related to trading concepts like PnL: https://ninjatrader.com/support/help...nce_statis.htm

        I would also suggest any follow-up questions that you may have on this subject it would be best for you to make a new thread for those questions so we don't reopen the original posters question.

        I look forward to being of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        85 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        143 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        83 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        256 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        334 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X