NexusFi: Find Your Edge


Home Menu

 





The difference in P&L of 2 positions


Discussion in NinjaTrader

Updated
    1. trending_up 1,799 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 jonc 
australia
 
Experience: Beginner
Platform: NinjaTrader
Trading: -
Posts: 303 since Sep 2010
Thanks Given: 123
Thanks Received: 140

Is there a simple way to keep track of the net P&L of 2 or more open positions every minute?

I want to have the net P&L per min stored and recorded over the length of a trading week (5 days for the entire 24 hours each day).

It can be an actual number stored or simply an indicator on the chart.

Thanks


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
CME Raises Energy Futures Margins After Iran-War Volatil …
Commodities
Victory Day Delivers: Russia-Ukraine Ceasefire Market Cl …
Prediction Markets & Event Contracts
Five Days Until the Gap Dies -- CME Goes 24/7 on All Dig …
Traders Hideout
CFTC Workforce Shrinks 24% to 15-Year Low While Predicti …
Traders Hideout
Prediction Markets Expiry Day: Trump Eyes War Exit, $230 …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
8 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #2 (permalink)
 
shodson's Avatar
 shodson 
OC, California, USA
Quantoholic
 
Experience: Advanced
Platform: IB/TWS, NinjaTrader, ToS
Broker: IB, ToS, Kinetick
Trading: stocks, options, futures, VIX
Posts: 1,971 since Jun 2009
Thanks Given: 534
Thanks Received: 3,711

You can do something like this

 
Code
double pnl = Position.GetProfitLoss(Close[0], PerformanceUnit.Currency);
Then display or store it however you want


Follow me on X Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #3 (permalink)
 jonc 
australia
 
Experience: Beginner
Platform: NinjaTrader
Trading: -
Posts: 303 since Sep 2010
Thanks Given: 123
Thanks Received: 140



shodson View Post
You can do something like this

 
Code
double pnl = Position.GetProfitLoss(Close[0], PerformanceUnit.Currency);
Then display or store it however you want

Does this mean I have to write a strategy? Can NT write to a text or excel file?

Is there anyway to just export the information on the position tab on a regular time frame?


Started this thread Reply With Quote
  #4 (permalink)
 
shodson's Avatar
 shodson 
OC, California, USA
Quantoholic
 
Experience: Advanced
Platform: IB/TWS, NinjaTrader, ToS
Broker: IB, ToS, Kinetick
Trading: stocks, options, futures, VIX
Posts: 1,971 since Jun 2009
Thanks Given: 534
Thanks Received: 3,711

Well if the position is in NT then yes you must do this in a strategy. If you want to use an indicator you'll need to enter the number of shares/contracts you own and you cost basis and then it can track PnL in real time but not the way I explained above, you'll have to do the math yourself.


Follow me on X Visit my NexusFi Trade Journal Reply With Quote




Last Updated on August 4, 2013


© 2026 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 - Downloads - Top
no new posts