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

Getting the profit for a trade

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

    Getting the profit for a trade

    Hey guys, last question for the day:

    Is there an easy way to get the profits generated for a statement like: ExitLong(Qnty, "exitLong1", "enterLong1")

    And I have do have multiple exits for the same entry so may be just a partial profit or loss.

    #2
    Originally posted by elitetradernyc View Post
    Hey guys, last question for the day:

    Is there an easy way to get the profits generated for a statement like: ExitLong(Qnty, "exitLong1", "enterLong1")

    And I have do have multiple exits for the same entry so may be just a partial profit or loss.
    Use the TradeCollection's TradesPerformance profile.

    Comment


      #3
      Is there a way to limit it to the current days trades?"

      // Print out the avg. profit of all trades in points

      Print("Average profit: " + Performance.AllTrades.TradesPerformance.Points.Avg Profit);

      Comment


        #4
        Hello elitetradernyc,

        Yes, you may use a variable to store your performance reports at the start of the days that way you may track your performance for the current day by subtracting the performance values from the start of the day.

        Our reference sample at the following thread demonstrates this that you may view.
        JCNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        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
        9 views
        0 likes
        Last Post guillembm  
        Started by junkone, 04-21-2024, 07:17 AM
        9 responses
        71 views
        0 likes
        Last Post jeronymite  
        Working...
        X