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 bc24fl, 08-30-2019, 01:58 PM
          4 responses
          258 views
          0 likes
          Last Post PaulMohn  
          Started by sugalt, Today, 04:02 AM
          0 responses
          4 views
          0 likes
          Last Post sugalt
          by sugalt
           
          Started by tradingnasdaqprueba, 04-09-2024, 09:52 AM
          6 responses
          29 views
          0 likes
          Last Post tradingnasdaqprueba  
          Started by PaulMohn, Today, 02:06 AM
          1 response
          3 views
          0 likes
          Last Post PaulMohn  
          Started by Mindset, Today, 01:27 AM
          0 responses
          5 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Working...
          X