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 > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 10-26-2008, 07:40 AM   #1
avihud
Junior Member
 
Join Date: Oct 2008
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
Default where to store variabels?

Is it possible to store vars? For example I would like to store the Day Open price while working on the 5 Min chart?
Thanks,
Avihu.
avihud is offline  
Reply With Quote
Old 10-26-2008, 07:59 AM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

Yes this is possible. Just declare a variable in a custom indicator like:

private double openPrice;

then in the OnBarUpdate() method:

if (FirstBarOfSession)
openPrice = Open[0];

or you could just use our CurrentDayOHL() indicator. More information - http://www.ninjatrader-support.com/H...entDayOHL.html
NinjaTrader_Ray 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
Store Range Bars Once They Are Created jvracing Suggestions And Feedback 5 02-21-2009 07:40 PM
Store Market Position Faspomy Strategy Development 15 10-24-2008 08:15 AM
Does NT store Tickdata? Hugo1 Connecting 1 10-14-2008 04:31 AM
Store data in SQL cirion Suggestions And Feedback 3 07-16-2008 07:47 AM
Market Analyzer doesn't store data MrBaffalo Market Analyzer 8 02-13-2007 01:57 AM


All times are GMT -6. The time now is 12:01 PM.