NinjaTrader Support Forum  
X

Attention!

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


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 10-22-2007, 05:35 PM   #1
Folls
Senior Member
 
Join Date: Jan 2006
Location: Chicago, Illinois, USA
Posts: 126
Thanks: 0
Thanked 1 time in 1 post
Default profit/loss for each symbol in multi-symbol strategy?

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
Folls is offline  
Reply With Quote
Old 10-22-2007, 07:28 PM   #2
woodside
Member
 
Join Date: Sep 2007
Posts: 72
Thanks: 0
Thanked 0 times in 0 posts
Default

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  ();            
    }
woodside is offline  
Reply With Quote
Old 10-23-2007, 01:06 AM   #3
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
Default

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.
NinjaTrader_Josh is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -6. The time now is 05:52 AM.