Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Avoiding opening gaps in oscillator

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

    Avoiding opening gaps in oscillator

    Hello,

    I am thinking in a method to avoid that an oscillator is affected with a big opening GAP. Like in the attached example that there is a gap up of 18 points in ES futures. The problem is that the oscillator also gaps up so much and its measures are incorrect until it corrects the gap.

    Any idea or example with similar solution?

    Thanks and regards,
    Attached Files

    #2
    Hello Sangui,

    Thank you for your post.

    As the indicator is based on the price values then it moves with the price. I am not aware of any recommended means to buffer the values and ensure the gaps do not cause the indicator to gap. What exactly this would be is up to interpretation, do you have any ideas on what you would like to occur instead? How would you keep the values accurate?

    Please let met know if you have any questions.

    Comment


      #3
      Well, I have an idea that is using AddDataSeries, like this:

      AddDataSeries(stringinstrumentName,BarsPeriodbarsPeriod,stringtradingHoursName)

      But I don't know how to use it very well, could you help me to configure the above with the following data:

      Trading Hours: CME US Index Futures ETH
      Instrument: the current one. In this case ES06-17
      Period Type: Minutes
      Period: 5 minutes

      Thanks in advance.

      Comment


        #4
        Hello Sangui,

        Thank you for your response.

        So is the primary series a RTH Trading Hours template and you are thinking a secondary series could keep track of the movement in between the close and open of the RTH Trading Hours?

        I look forward to your response.

        Comment


          #5
          The primary series is RTH and I would like to use the oscillator with ETH by using something like:

          BarsPeriod bp = new BarsPeriod(); bp.BaseBarsPeriodType = BarsPeriodType.Minute; bp.BaseBarsPeriodValue = 5; AddDataSeries(Instrument.ToString(), bp, 5, "CME US Index Futures ETH", false);

          But I don't know if that is correct or not.

          Comment


            #6
            Hello Sangui,

            Thank you for your response.

            That is correct, although the Instrument is unlikely to have loaded yet. So you would want to writ ethe string directly to the overload. For example:
            Code:
            AddDataSeries("ES 09-17", bp, 5, "CME US Index Futures ETH", false);
            Please let me know if you have any questions.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            567 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            330 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            548 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            548 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X