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 AaronKoRn, Today, 09:49 PM
        0 responses
        11 views
        0 likes
        Last Post AaronKoRn  
        Started by carnitron, Today, 08:42 PM
        0 responses
        10 views
        0 likes
        Last Post carnitron  
        Started by strategist007, Today, 07:51 PM
        0 responses
        11 views
        0 likes
        Last Post strategist007  
        Started by StockTrader88, 03-06-2021, 08:58 AM
        44 responses
        3,980 views
        3 likes
        Last Post jhudas88  
        Started by rbeckmann05, Today, 06:48 PM
        0 responses
        9 views
        0 likes
        Last Post rbeckmann05  
        Working...
        X