![]() |
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
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Dec 2010
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
|
Hi, I am writing a strategy and want to reference a variable that I am calculating historically.
For Example: int variable1 = {MyCalculation} Strategy Entry if ( variable1[0] > variable1[1] ) EnterLong.... I am not sure if this is the best way of doing it, or if in fact it can be done. Thanks |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,411
Thanks: 252
Thanked 976 times in 959 posts
|
You would need to work with a DataSeries object to be able to reference historical values, an intSeries in your case here - http://www.ninjatrader.com/support/h...ries_class.htm
Bertrand
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SetProfitTarget not filling when touched historically | terabyte | Strategy Development | 10 | 08-19-2010 12:48 PM |
| Variable reference problem | rhbishop5 | General Programming | 6 | 01-17-2010 09:40 PM |
| How to use GetMinMaxValues(), reference available? | Stone | General Programming | 2 | 03-22-2009 08:20 AM |
| reference stochastic d and k? | suedeuno | General Programming | 1 | 01-09-2009 08:40 PM |
| Reference guide for system variable | toyogo00 | General Programming | 7 | 06-13-2008 12:25 PM |