NexusFi: Find Your Edge


Home Menu

 





Show running P&L on the chart


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Futuresatm with 3 posts (0 thanks)
    2. looks_two Azzzz with 2 posts (1 thanks)
    3. looks_3 estrade with 1 posts (0 thanks)
    4. looks_4 Spike13 with 1 posts (1 thanks)
    1. trending_up 4,920 views
    2. thumb_up 2 thanks given
    3. group 6 followers
    1. forum 8 posts
    2. attach_file 2 attachments




 
Search this Thread

Show running P&L on the chart

  #1 (permalink)
 Futuresatm 
Elkridge
 
Experience: Advanced
Platform: Ninjatrader, TOS
Trading: Futures, Options
Posts: 5 since Apr 2020
Thanks Given: 2
Thanks Received: 0

I want to see the running P&L plotted on the chart to see how my stratergy is performing in realtime. Is there an indicator or a code block i can use to show this? Please let me know. I am using Ninjatrader 8. Thanks in advance.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
REcommedations for programming help
Sierra Chart
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
Quant vue
Trading Reviews and Vendors
Better Renko Gaps
The Elite Circle
 
  #2 (permalink)
 ChazJ 
Phoenix, AZ
 
Experience: Intermediate
Platform: NinjaTrader, ThinkOrSwim
Trading: Emini NQ, ES
Posts: 5 since Oct 2019
Thanks Given: 1
Thanks Received: 2

Hi,

You can see both realized and unrealized profit in the Strategies tab of the Control Center Window.

If you want to print it on the chart itself you can use the Draw.Text function and print out 'Position.GetUnrealizedProfitLoss(...).ToString()' on every bar close or some multiple of that. Check the documentation for specific syntax and required parameters for these functions.

Hope that helps.

Charlie

Reply With Quote
  #3 (permalink)
 Azzzz 
Ontario
 
Experience: Intermediate
Platform: Ninja
Broker: Amp Futures/Zen-Fire
Trading: ES, currancy
Posts: 24 since Nov 2009
Thanks Given: 12
Thanks Received: 6


Not sure if this is what you are looking for...

https://ninjatraderecosystem.com/user-app-share-download/position-display-indicator/

Reply With Quote
  #4 (permalink)
 Spike13 
Waldorf, MD/US
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus Futures/Zen-Fire
Trading: crude oil
Posts: 1 since May 2013
Thanks Given: 37
Thanks Received: 1

I was having a problem with my Ninja Trader 8 platform keeping up not only with the P/L but also the actual chart data.
This is what I finally did. I found this indicator in the downloads section called TickRefresh. I added it to my range chart, which I found was using more data than time based charts. In the parameters of the TickRefresh indicator, I set the Refresh Time Interval to 100 milliseconds. I no longer have a problem with my P/L reporting improperly or my chart keeping up with the data. Hope this helps. And much thanks to the creator of the TickRefresh indicator.

Reply With Quote
Thanked by:
  #5 (permalink)
 Futuresatm 
Elkridge
 
Experience: Advanced
Platform: Ninjatrader, TOS
Trading: Futures, Options
Posts: 5 since Apr 2020
Thanks Given: 2
Thanks Received: 0



Thanks All for your inputs. I tried to download from that link but its hanging did anyone try to download?

Started this thread Reply With Quote
  #6 (permalink)
 Azzzz 
Ontario
 
Experience: Intermediate
Platform: Ninja
Broker: Amp Futures/Zen-Fire
Trading: ES, currancy
Posts: 24 since Nov 2009
Thanks Given: 12
Thanks Received: 6

I've attached my copy... it is the CS file so you will need to drop it into the Indicator folder.

Documents\NinjaTrader 8\Bin\Custom\Indicators

Attached Files
Elite Membership required to download: PositionDisplayIndicator.cs
Reply With Quote
Thanked by:
  #7 (permalink)
 Futuresatm 
Elkridge
 
Experience: Advanced
Platform: Ninjatrader, TOS
Trading: Futures, Options
Posts: 5 since Apr 2020
Thanks Given: 2
Thanks Received: 0


Azzzz View Post
I've attached my copy... it is the CS file so you will need to drop it into the Indicator folder.

Documents\NinjaTrader 8\Bin\Custom\Indicators

Thank you very much, It worked.

Started this thread Reply With Quote
  #8 (permalink)
 chupa2222 
Belgium
 
Experience: Intermediate
Platform: NT8 Bookmap
Trading: Crypto
Posts: 2 since May 2012
Thanks Given: 11
Thanks Received: 0

Please can you add for me something like "AddPlot(new Stroke(Brushes.Blue), PlotStyle.Bar, "unRealizedPnL");"

I need to call "unRealizedPnL" in BloodHound or in a strategy to manage the money management in hedging positions.

Thank you so much if you are able to do that.

Attached Files
Elite Membership required to download: PositionDisplayIndicator.cs
Reply With Quote
  #9 (permalink)
 estrade 
Austin/TX
 
Experience: Advanced
Platform: NT
Trading: ES, TF
Posts: 51 since Jun 2010
Thanks Given: 3
Thanks Received: 20

The total PnL on the chart would be nice

Reply With Quote




Last Updated on February 17, 2022


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts