Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

highest high / lowest low of first hour of trading

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    highest high / lowest low of first hour of trading

    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);
    }

    #2
    You may find relevant information in the reference sample for breakout: http://www.ninjatrader-support.com/v...ead.php?t=3223
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      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

      Comment


        #4
        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.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          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.

          Comment


            #6
            >> 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.

            Comment


              #7
              thank you for responding. Perhaps this is something that can be incorporated in future releases.

              Comment


                #8
                Thanks for your suggestion. We'll add it to the list of future considerations.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Barry Milan, Today, 10:35 PM
                1 response
                8 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Started by WeyldFalcon, 12-10-2020, 06:48 PM
                14 responses
                1,428 views
                0 likes
                Last Post Handclap0241  
                Started by DJ888, Yesterday, 06:09 PM
                2 responses
                9 views
                0 likes
                Last Post DJ888
                by DJ888
                 
                Started by jeronymite, 04-12-2024, 04:26 PM
                3 responses
                40 views
                0 likes
                Last Post jeronymite  
                Started by bill2023, Today, 08:51 AM
                2 responses
                16 views
                0 likes
                Last Post bill2023  
                Working...
                X