PDA

View Full Version : highest high / lowest low of first hour of trading


velocity
06-15-2008, 09:20 AM
I am trying to post the highest high and lowest low of the 1st hour of trading the ES. Any thoughts as to where I went wrong would be appreciated.

thanks.


protectedoverridevoid Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.Red), PlotStyle.Line, "Plot0"));
Add(new Plot(Color.FromKnownColor(KnownColor.DarkBlue), PlotStyle.Line, "Plot1"));
CalculateOnBarClose = true;
Overlay = true;
PriceTypeSupported = false;
}
///<summary>
/// Called on each bar update event (incoming tick)
///</summary>
protectedoverridevoid OnBarUpdate()
{
// trying to plot the highest high and lowest low for the 1st hour of trading.

value1 == ToTime(Time[0]) >= 93000 && ToTime(Time[0]) <= 103000;
value2 == ToTime(Time[0]) >= 93000 && ToTime(Time[0]) <= 103000;

High = Math.Max(value1, value2);
Low = Math.Min(value1, value2);

Plot0.Set(High);
Plot1.Set(Low);
}

NinjaTrader_Josh
06-15-2008, 12:25 PM
You may find relevant information in the reference sample for breakout: http://www.ninjatrader-support.com/vb/showthread.php?t=3223

velocity
06-15-2008, 07:12 PM
Appreciate your post Josh, However those examples are based on "bars" not "time".

Does NT have the capability of "time referrence" for example: only calculate an indicator between the time referrenced?

any thoughts on this would be appreciated.

thanks

NinjaTrader_Josh
06-15-2008, 10:53 PM
Not sure I follow. Bars are time stamped. You can calculate time via the bars. If you are hoping for time intervals that is not the same interval as your bars I suggest you change your chart to reflect the time interval you want thus have corresponding bars. If this is not what you want then you can try checking out the reference sample about custom timer events.

velocity
06-16-2008, 05:39 AM
Can NT only calculate an indicator between certain times. For example 9:30 to 10:30? How would I do this.

In searching your database of posts I see several individuals who have asked the same thing as I am asking. However, there is no post with an answer.

I also use Neoticker and Market Delta Software. I programed the Highest High and Lowest Low in the 1st hour of trading less than 5 minutes. So I am wondering why this simple task is so difficult in NT?

Any thoughts would be appreciated.

thanks.

NinjaTrader_Dierk
06-16-2008, 07:16 AM
>> Can NT only calculate an indicator between certain times. For example 9:30 to 10:30?
Unfortunately this is not supported. Indicators are calculated for all bars on a chart. You can try to set your chart session begin/end values accordingly though.

velocity
06-16-2008, 09:06 AM
thank you for responding. Perhaps this is something that can be incorporated in future releases.

NinjaTrader_Dierk
06-16-2008, 09:07 AM
Thanks for your suggestion. We'll add it to the list of future considerations.