• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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.

    JesseNinjaTrader Customer Service

    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.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by futurestrader7, Today, 11:31 AM
        0 responses
        3 views
        0 likes
        Last Post futurestrader7  
        Started by Teebone21, Today, 10:38 AM
        0 responses
        7 views
        0 likes
        Last Post Teebone21  
        Started by J_o_s, 03-30-2020, 12:29 AM
        2 responses
        16 views
        0 likes
        Last Post J_o_s
        by J_o_s
         
        Started by ptpatrader, Today, 10:27 AM
        0 responses
        5 views
        0 likes
        Last Post ptpatrader  
        Started by albertokeira, Today, 09:30 AM
        0 responses
        8 views
        0 likes
        Last Post albertokeira  
        Working...
        X