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 Christopher_R, Today, 12:29 AM
                0 responses
                9 views
                0 likes
                Last Post Christopher_R  
                Started by sidlercom80, 10-28-2023, 08:49 AM
                166 responses
                2,235 views
                0 likes
                Last Post sidlercom80  
                Started by thread, Yesterday, 11:58 PM
                0 responses
                3 views
                0 likes
                Last Post thread
                by thread
                 
                Started by jclose, Yesterday, 09:37 PM
                0 responses
                8 views
                0 likes
                Last Post jclose
                by jclose
                 
                Started by WeyldFalcon, 08-07-2020, 06:13 AM
                10 responses
                1,415 views
                0 likes
                Last Post Traderontheroad  
                Working...
                X