![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Jan 2006
Location: Chicago, Illinois, USA
Posts: 126
Thanks: 0
Thanked 1 time in 1 post
|
Hi,
I am running a strategy with multiple symbols. Is it possible to get cumulative profit/loss for each individual symbol? I tried: Performance[0].AllTrades.Performance.Currency.CumProfit.ToString (); However, Performance is not indexable. Is there another way? Thanks, Folls |
|
|
|
|
|
#2 |
|
Member
Join Date: Sep 2007
Posts: 72
Thanks: 0
Thanked 0 times in 0 posts
|
You tried using the BarsInProgress instead of an index?
Like: Code:
if (BarsInProgress == 0)
{
//performance for first symbol
Performance.AllTrades.Performance.Currency.CumProfit.ToString ();
}
if (BarsInProgress == 1)
{
//performance for second symbol
Performance.AllTrades.Performance.Currency.CumProfit.ToString ();
}
|
|
|
|
|
|
#3 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
I believe the "Performance.AllTrades.Performance.Currency.CumPro fit" only keeps track of profits generated on a strategy level instead of an instrument level.
Are you doing trades on multiple instruments simultaneously? I believe in NinjaTrader 6 it will only let you execute trades on the primary instrument.
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Strategy Realised Profit and Loss on session exit | richa61416 | Strategy Development | 2 | 10-09-2007 02:56 PM |
| New Symbol | momentom | Charting | 4 | 10-05-2007 12:44 PM |
| Symbol Map . . . . .. | barrykish@comcast.net | Miscellaneous Support | 3 | 09-13-2007 04:45 PM |
| Strategy: Modifying the price of stop loss and profit target orders | NinjaTrader_Josh | Reference Samples | 0 | 09-06-2007 12:46 PM |
| Multi strategies same symbol question? | surfeur | Automated Trading | 3 | 06-15-2007 07:14 AM |