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-02-2012, 06:54 PM   #1
jmflukeiii
Senior Member
 
Join Date: Dec 2011
Posts: 190
Thanks: 16
Thanked 6 times in 6 posts
Default Creating Specific Bar Conditions and Storing for Later Recall

So I would like to store a specific bar condition, for example, range1<range2 where range is High[x] - Low[x], if this specific bool that range1 (i.e. High[0]-Low[0]) is less than range2 (i.e. High[1]-Low[1]) for later use. How can I do this?

To clarify, if that bool is true, and then on then within 3 bars, I get another bool to be true (for example, volume1<volume2), I want a Dot to be plotted or something like that.

Basically, how do I store that first bool so that I can set bools based on it? i.e. we'll call range1<range2 = lowrange.

So if lowrange = true WITHIN 3 BARS, and now vol1<vol2, DO something.

Sorry if there is confusion, I can try to be more clear, but its a bit hard to word and hopefully what i'm looking for makes some sense. In essence, storing a bool as true for a certain amount of time longer than just the bar it is true on.
jmflukeiii is offline  
Reply With Quote
Old 07-03-2012, 02:10 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,409
Thanks: 252
Thanked 975 times in 958 posts
Default

jmflukeiii, I'm not sure I follow your request - if you set a variable (for example a bool) it would only be set / reset if your specifically tell it to do so via your code, it would not have an expiration of values for example as you know from NT's default order entry handling for non market orders.
NinjaTrader_Bertrand is online now  
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
Entry & Exit Conditions at the same bar "CJS" Strategy Development 3 03-21-2011 11:55 AM
date/bar conditions SARdynamite Indicator Development 2 07-02-2010 02:39 PM
Recall indicator value from entry bar for exit condition? Scotty.Trump General Programming 2 06-25-2010 03:56 PM
Storing Real Time Bar Data and Performance drob9876 Miscellaneous Support 1 04-01-2009 09:18 AM
Storing real time bar data monpere Charting 5 06-24-2008 07:02 PM


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