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

How to ensure that when I close a trade, it is actually profitable

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

    How to ensure that when I close a trade, it is actually profitable

    Hi NT8, First, let me just say how helpful NT8 support it, You always help!

    Looking for assistance in the below because it is causing some issues, and because I have tried many things and just need help.

    It seems like the trade performance isn't matching profitable trades at times in this scenario:

    - I enter a trade long, the market goes down 10 points
    - I enter another trade (without exiting the first) and set a profit target of 3 points, yet the average price is now at first entry minus 5 points
    - when I hit the target, my realized PnL shows +profit from the 3 points I won on the second trade
    - The market goes up by another 3 points, now at 1 point higher than my average entry price from the two trades (one of which I've already exited)
    - my Unrealized PnL shows +1 point to the positive. At this moment, my unrealized is positive from my first trade, and my realized is positive from the second trade I already exited
    - Upon exit, I lose PnL, because the profit is calculated from the average entry price, not the total PnL of that first trade's entry point.
    - This is a simple example, but I am building strategies with several interim targets on different markets and it can often appear as if I can exit my trades and have a positive PnL at the end, but this often seems to not happen

    seeking your help in the simplest solution to know if when I exit, my realized PnL will not be less than it's current value / finding an accurate total of if my sum trades are profitable or not at a given moment. Looking for this help because it is causing issues and because I've tried a lot of things.

    Thank you!

    #2
    Hello Austiner87, thanks for your post.

    There is no way to change the behavior of the PnL display in the Chart Trader or SuperDOM window. This is a display of your daily PnL. The best way to get a breakdown of trades is to look at the Orders or Executions tab of the Control Center or go to New>Trade Performance to view a breakdown of trades that have completed.

    https://ninjatrader.com/support/help...erformance.htm - Trade Performance

    Please let me know if I can assist any further.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Hi Chris,

      Thank you for responding, I need more help because I believe there is a solution in this somewhere.

      Is there perhaps code that would display the current PnL of each trade in the output window that i could then reconcile with a addition formula or something?

      . Thank you

      Comment


        #4
        Hello Austiner87, thanks for your reply.

        I am not aware of any existing examples that will produce this information. Every execution that takes place on an account can be captured by a NinjaScript Addon. If you make a custom addon you can do just about anything. We have a full example here:



        https://ninjatrader.com/support/help...tionupdate.htm - Account.ExecutionUpdate event.

        Please let me know if I can assist any further.
        Chris L.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by dustydbayer, Today, 01:59 AM
        0 responses
        1 view
        0 likes
        Last Post dustydbayer  
        Started by inanazsocial, Today, 01:15 AM
        0 responses
        2 views
        0 likes
        Last Post inanazsocial  
        Started by trilliantrader, 04-18-2024, 08:16 AM
        5 responses
        22 views
        0 likes
        Last Post trilliantrader  
        Started by Davidtowleii, Today, 12:15 AM
        0 responses
        3 views
        0 likes
        Last Post Davidtowleii  
        Started by guillembm, Yesterday, 11:25 AM
        2 responses
        10 views
        0 likes
        Last Post guillembm  
        Working...
        X