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.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 03-21-2012, 04:09 PM   #1
coolmoss
Senior Member
 
Join Date: Dec 2007
Posts: 365
Thanks: 36
Thanked 28 times in 24 posts
Default How to programattically access an indicator variable

In the attached script, there are two variables (numHighs, numLows) that I'd like to access from a strategy. If the values I wanted to access were the plot output for the indicator, I know how to do that. However, in this case, I wish to access the variables mentioned above, which are set to plot on the chart as text. The code is complex enough that I'd like to avoid rewriting it from scratch.

Is there any simple syntax I could use to assign the variable values, say to an array, and then access the array in the strategy?

ESFXtrader_CCIBarCounter_v7.cs
coolmoss is offline  
Reply With Quote
 

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
Access a variable that is not plotted wallabee13 Market Analyzer 3 03-07-2012 07:21 AM
Access indicator's public variable value binwang2 General Programming 4 02-25-2010 07:01 AM
Variable transfer/access between OnBarUpdate and OnExecution noincomenojobnoassets Strategy Development 9 09-23-2009 03:36 AM
How can access a variable defined in other section jrbolsa General Programming 6 04-06-2009 12:42 PM
access variable outside of if block? auspiv General Programming 6 07-13-2008 07:52 PM


All times are GMT -6. The time now is 05:46 PM.