View Full Version : 9.30 open price, 4.30 close
diffused
01-20-2009, 10:00 AM
hi,
how could I go about getting todays Open and Close price on a gap chart.
i'm after the 9.30 es open price and the prior day 4.30 close price.
NinjaTrader_Bertrand
01-20-2009, 10:31 AM
Hi diffused, you can use a combination of CurrentDayOHL and PriorDayOHLC to get this info in your charts.
http://www.ninjatrader-support.com/HelpGuideV6/CurrentDayOHL.html
http://www.ninjatrader-support.com/HelpGuideV6/PriorDayOHLC.html
diffused
01-20-2009, 01:14 PM
thanks.
is there a way to also in the same chart/strat to get the high/low of the whole 24 hour period?
basically, i want to see the session open along with high/low including the overnight info but on a gap chart. i also plan to use this in a strategy
NinjaTrader_Josh
01-20-2009, 01:18 PM
Use CurrentDayOHL(). The session is determined by the settings of your chart.
Ultimately you can also just use MAX(High, 20)[0] and MIN(Low, 20)[0] where 20 is the number of bars you want to look back. Determine how many bars you need to look back via GetBar() and then you can figure out the high and low for that given range of time.