Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 04-28-2007, 11:04 PM   #1
MindSabre
Junior Member
 
Join Date: Apr 2007
Location: , ,
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

Hi,

I'm a bit new at NinjaScript so please forgive if this is a stupid question. (i do have some .NET programming experience)

Is there any class/object providing info (entry price, exit price, profit/loss, time. etc. etc.) about specific trades?

For example, unsing NinjaScripthow would I determine if the previous trade of the day was a winner or loser?

I came across this requirement while trying to convert some of my EasyLanguage code to NinjaScript.

Any response much appreciated.

Regards,



Jerry


MindSabre is offline  
Reply With Quote
Old 04-28-2007, 11:43 PM   #2
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 7 times in 7 posts
Post imported post

>> Is there any class/object providing info (entry price, exit price, profit/loss, time. etc. etc.) about specific trades?

You could try playing with a 1 tick series which holds all trades of the complete lookback period

>> For example, unsing NinjaScripthow would I determine if the previous trade of the day was a winner or loser?

StrategyBase.Performance.AllTrades is a collection of all trades of the strategy (pls serach docs for AllTrades).


NinjaTrader_Dierk is offline  
Reply With Quote
Old 04-29-2007, 12:33 AM   #3
MindSabre
Junior Member
 
Join Date: Apr 2007
Location: , ,
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

Thanks for the response.

>>StrategyBase.Performance.AllTrades is a collection of all trades of the strategy (pls serach docs for AllTrades).


Yes, but how does one reference individual trades in the collection and expose its properties?
MindSabre is offline  
Reply With Quote
Old 04-29-2007, 12:45 AM   #4
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 7 times in 7 posts
Post imported post

Sorry, indexed access it not supported at this time. This is "only" an enumerator.
NinjaTrader_Dierk 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


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

FULL RISK DISCLOSURE: Futures trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones financial security or lifestyle. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results. View Full Risk Disclosure.