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 rdtdale, Today, 01:02 PM
          0 responses
          3 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by alifarahani, Today, 09:40 AM
          3 responses
          15 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by RookieTrader, Today, 09:37 AM
          4 responses
          18 views
          0 likes
          Last Post RookieTrader  
          Started by PaulMohn, Today, 12:36 PM
          0 responses
          9 views
          0 likes
          Last Post PaulMohn  
          Started by love2code2trade, 04-17-2024, 01:45 PM
          4 responses
          41 views
          0 likes
          Last Post love2code2trade  
          Working...
          X