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 > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 07-16-2012, 03:40 AM   #1
daglas
Senior Member
 
Join Date: Mar 2011
Location: Ukraine
Posts: 146
Thanks: 19
Thanked 2 times in 2 posts
Default getting account data from indicator

Dear friends.
I want to get data about account positions / order/ and etc via indicator.
I have copy/paste this code from one of my strategy (this code working well in strategy)
Code:
System.Collections.IEnumerator ListOrders = Account.Orders.GetEnumerator();
System.Collections.IEnumerator ListExec = Account.Executions.GetEnumerator();
System.Collections.IEnumerator ListS = Account.Strategies.GetEnumerator();
But it did not work in indicator. Indicator can not be compiled.
daglas is offline  
Reply With Quote
Old 07-16-2012, 03:55 AM   #2
NinjaTrader_Joydeep
NinjaTrader Customer Service
 
NinjaTrader_Joydeep's Avatar
 
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
Default

Hello daglas,
The Account class is not exposed in an indicator, like it is exposed in a strategy. You can refer to this code to get an idea how to expose the Account class, but nothing we would support officially.
http://ninjatrader.com/support/forum...atid=6&lpage=1
NinjaTrader_Joydeep 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
Account Group with Live Account and Sim Account Taddypole Installation and Licensing 7 09-30-2011 03:00 PM
Account.Name in Indicator ATI user Indicator Development 1 12-09-2010 10:47 AM
How to remove an account in Account Performance Tabs and Historical data AlphonsD Miscellaneous Support 3 12-07-2010 03:14 PM
On account performance grid - indicator value everington_f Automated Trading 1 08-31-2009 12:38 PM
No data from a new account with PATS pipal Connecting 6 06-11-2009 08:04 AM


All times are GMT -6. The time now is 11:40 AM.