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

Draw in Chari profit

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

    Draw in Chari profit

    Hello i need draw in the chat, down left. The profit and loss in current moment.

    I dont know because i use drawtextfixed but i dont know where i put profit and loss with :
    position.GetProfitLoss(Close[0], PerformanceUnit.Currency);

    In drawtextfixed need tag, text i write and text position.

    Please example of this. Thanks.

    #2
    Hello tibetillo,

    I've created a quick example to demonstrate showing the unrealized PnL in a textbox.

    Follow these steps to import the NinjaScript:
    1. Download the script to your desktop, keep it in the compressed .zip file.
    2. From the Control Center window select the menu File > Utilities > Import NinjaScript
    3. Select the downloaded .zip file
    4. NinjaTrader will then confirm if the import has been successful.

    Critical *Note that on any files that say "File already exists on your PC" that start with an "@" symbol are the ones that came preloaded inside of NinjaTrader so you would say "No" so that you do not override those files.
    Attached Files
    Last edited by NinjaTrader_ChelseaB; 05-17-2016, 07:54 AM.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello perfect!

      For put the realized pnl what is the comand?

      Thanks

      Comment


        #4
        Hi tibetillo,

        For realized PnL this can be found with the Performance collection.

        For example:
        Code:
        Print(Performance.AllTrades.TradesPerformance.Currency.CumProfit);
        Or if you want to get just the last trades performance:
        Code:
        Print(Performance.AllTrades[Performance.AllTrades.Count-1].ProfitCurrency);
        Below is a link to the help guide on the Performance collection for AllTrades.
        http://ninjatrader.com/support/helpG.../alltrades.htm

        As well as link to the TradeCollection on Currency.
        http://ninjatrader.com/support/helpG...7/currency.htm
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Thanks my friend.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by ETFVoyageur, Today, 07:55 PM
          0 responses
          6 views
          0 likes
          Last Post ETFVoyageur  
          Started by janio973, Today, 07:24 PM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by aligator, 01-06-2022, 12:14 PM
          4 responses
          242 views
          0 likes
          Last Post john_44573  
          Started by reynoldsn, Today, 05:56 PM
          0 responses
          13 views
          0 likes
          Last Post reynoldsn  
          Started by bortz, 11-06-2023, 08:04 AM
          51 responses
          1,996 views
          0 likes
          Last Post aligator  
          Working...
          X