Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Session OHLC and Pivots Beta for NT 6.5.8.

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

    #31
    Ok please disregard my last post

    I just found the problem

    Thanks a lot

    Comment


      #32
      Newer version of SessionPivot Indicators

      Please find enclosed a newer version of the SessionPivot Indicators. There are some smaller changes. A small bug was removed that only occured in DailyBars mode for MonthlyPivots on Intraday Charts.

      If you have any questions, do not hesitate to contact me. For user information see previous posts.
      Attached Files

      Comment


        #33
        Outstanding work!! I am having an oddity that I can't explain. I have the version 4 weekly and monthly pivots on forex hourly charts. The data feed is the GAIN feed through the NinjaTrade servers.

        What is odd is that the pivots appear perfectly fine on the $EURUSD hourly chart. Then, all I do is change the financial instrument (via CTRL+F) to $EURAUD and the pivots don't appear. I've checked all the currency pairs available in NinjaTrader and other pairs work and other's have this same odd behavior.

        I really doubt it's these indicators as they seem to be outstanding, but do you have any thoughts or do you have the same problem with those currency pairs mentioned?

        Thanks much.

        Comment


          #34
          Hi Greg,

          the indicator was programmed for a limited number of instruments, as each instrument needs to be linked to a market and each market needs to be linked to a time zone. I simply did not include $EURAUD. It is no problem to add it - please let me know which currency pairs should be added.

          Comment


            #35
            Ahh, I should have looked at the code...Here are the code lines for all the FOREX financial instruments that Ninja Trader has:

            if (Instrument.MasterInstrument.Name == "AUDJPY"||Instrument.MasterInstrument.Name == "AUDUSD"||Instrument.MasterInstrument.Name == "CADJPY"
            ||Instrument.MasterInstrument.Name == "EURAUD"||Instrument.MasterInstrument.Name == "EURCAD"||Instrument.MasterInstrument.Name == "EURCHF"
            ||Instrument.MasterInstrument.Name == "EURGBP"||Instrument.MasterInstrument.Name == "EURJPY"||Instrument.MasterInstrument.Name == "EURUSD"
            ||Instrument.MasterInstrument.Name == "GBPCHF"||Instrument.MasterInstrument.Name == "GBPJPY"||Instrument.MasterInstrument.Name == "GBPUSD"
            ||Instrument.MasterInstrument.Name == "NZDJPY"||Instrument.MasterInstrument.Name == "NZDUSD"||Instrument.MasterInstrument.Name == "USDCAD"
            ||Instrument.MasterInstrument.Name == "USDCHF"||Instrument.MasterInstrument.Name == "USDJPY")

            Thanks again. Masterful work.

            Comment


              #36
              Guys, have not read through complete thread ... but if you wanted to check for currency you could do something like

              if (Instrument.MasterInstrument.InstrumentType == Cbi.InstrumentType.Currency)

              Comment


                #37
                Added currency instruments

                Hi Greg,

                added the instruments, otherwise identical to prior version. Thanks to invention of "copy and paste" only took a couple of minutes.
                Attached Files

                Comment


                  #38
                  Thanks for the hint

                  Hi Dierk,

                  will do so for the next version of the indicator. I started this for futures, and as I need to take into account the session times for each group of futures, the code checks for each instrument to add session times and then the local time of the exchange needed to calculate pivots... However currencies can be treated as a group, so thanks again for the hint.

                  Comment


                    #39
                    Conceptual Mistake, Pivots Indicator not helpful

                    I've been checking your indicator for the last 3 days, wondering why it sometimes generates seemingly right results and sometimes not. As you wrote, you coded the indicator to "...use the Session Low, Session High and Session Close of a 24 hour session." In my opinion this is the conceptual mistake that causes the wrong results. By entering a Session Break Time the indicator starts looking for the relevant HLC from the Session Break Time backwards. So it uses the close of the defined candle and the high and low of the previous 24 hour period. If the high and/or low values happen to appear in the second last day instead of the last day (where the values for the current daily pivots should come from), it of course generates wrong results. Or if a new high and/or low appears after the Session Break Time, the results are wrong too (see example).

                    The NT Pivots indicator doesn't help here. It only looks back for the relevant values within the last day, which is absolutely right, but doesn't have a Session Break Time parameter. So it simply uses the daily close value. This can be accidentally the exchanges daily settlement price (which is usually used as the close price in a pivot calculation), but most often is not. The values one gets by defining a Session Break Time are usually very close to the exchanges settlement price .

                    So a solution would be, if you could adjust your indicator according to the NT Pivots indicator to only look back for values within the last day instead of a 24 hour period. If NT instead could add the Session Break Time parameter to its Pivots indicator, we would get the same result.

                    The best solution of course would be, if NT could get the daily settlement price from the different exchanges for its Pivot indicator, but as I remember, Ray once wrote that for some reason they can't provide this data.

                    By the way, I live in the central european time zone and as fas as this is concerned, the indicator works well.

                    Thanks for your work so far, right now it is a good way to get at least close to the actual pivot values.
                    Attached Files

                    Comment


                      #40
                      Hi NinjaTurtle,

                      understand what you mean. You would like a session start and end to select from. This would be lots of work for me - although I am sure it could be done. Do you really need this feature? What are the pivots used by DAX traders?

                      If you look at http://www.derivatecheck.de/tools/pivots.m you will find that they calculate Pivots by using the close of the EUREX futures market at 10 PM and not the close of the underlying XETRA market at 5:30 PM.

                      Also I want to point out that since I started to code this indicator, NinjaTrader has improved its original pivots indicator which can now take High, Low and Close from daily bars.

                      To get the pivots the way you want them, try the following: Set the pivot indicator of NT (or my modified indicator) to CalcFromIntraDayData and select your session times in the properties panel of the chart. This way you can suppress unwanted data which will not be used for the calculation of the pivots but also not shown on the chart.

                      Comment


                        #41
                        Attached is code from an eSignal script that does what you want. It's Javascript-based, but I don't know enough about Ninjascript to convert it.
                        Attached Files

                        Comment


                          #42
                          Thanks for the code, unfortunately I am not using E-Signal and also the internal logic of NT is different. Anyhow, if I have some spare time, I will think about how to implement a session start time for the indicator.

                          Comment


                            #43
                            Hi Harry,

                            first of all thank you for your reply and for pointing out an important question. Which pivots do I really want or need? Well, I want to see the pivots the majority of the other traders are using. Needles to say, trading is not about having some special tool/secrets/values, but knowing what the others will probably react to.

                            Though I use www.derivatecheck.de from time to time, I never used their Pivots tool. So I was quite surprised to see, what HLC values they are using. Compared with www.mypiovts.com the high and low are the same, but the close is different (general problem), since they are using the days last value as close.

                            As Ray once explained (http://www.ninjatrader-support.com/v...ead.php?t=4676) usually the settlement price from the different exchanges is used as the close value (CME=15:15, Eurex usually 17:30 etc). If NT had this value, we wouldn’t discuss this point and you would not have had to program this indicator. But NT doesn’t have that value, so they need workarounds. The one they choose is to use the day’s close, what some other websites are obviously doing too, since they can’t get the real settlement price. This of course leads to “wrong” results, depending on what one want’s to see. But it is quite obvious, that using the day’s close will lead to totally different numbers, the stronger the movement after the settlement time (15:15 ET or 17:30 CET) is. The platforms I used so far for some reason usually contained the settlement price and I never even had to even think about the “right” pivot value.

                            Now your indicator offers the possibility to get as close as possible to the truth with NT, by defining a Session Break time. But just as I wrote, it looks from this break time backwards within a 24 hour period. So if it finds higher highs or lows even in the previous day, it will use these values. If on the other hand higher highs or lows appear after this time, it will ignore them, generating wrong values. Only the close value is generally as close as possible to the real settlement price, since they are calculated at the same time (though they can still differ for exchange reasons).

                            So what could be the solution? I’m not sure, if it would be necessary to define a session start and end to select from, though of course it is a possible solution. Maybe it would also help, if your indicator could refer to the session begin and end times from the chart properties.

                            The third suggestion would be that your indicator stays within the date boundaries, taking the close from the Session Break Time and checking the rest of the trading day for high and lows within the date line. Unless NT gets the true settlement price, this would be the closest to the truth.

                            Just as I said, I appreciate your work and the discussion so far. If you find the time to improve your indicator and get it closer to the truth, I’m sure, I won’t be the only one to benefit from it. If not, thanks anyway, it forced me to deal with the code itself, which then again helped me to improve some other indicators according to my needs.

                            Comment


                              #44
                              Reduced session

                              Let's see what I can do.

                              Comment


                                #45
                                Improved version of SessionPivot Indicator

                                The indicator now allows to define session start and session end times when using CalcFormIntradayData mode. This allows to calculate pivots based on the opening hours of the underlying market instead of the futures market itself.

                                Please remember
                                - that this indicator only should be used for FOREX and the main futures markets (please let me know if some other markets should be added)
                                - that session times for this indicator always be expressed in local time of the exchange
                                - that the session end time should be selected in a way that the close of the last session bar shown on the chart is the actual session close
                                - that for timeframes > 30 min pivots can be displayed inaccurately in CalcFromIntradayData mode if session times are not chosen appropriately
                                - that for use with the standard market session the DailyBars mode works well with larger timeframes - if your data vendor supplies daily bars.

                                I have only quickly tested the changes, so please let me know, if something does not work yet.
                                Attached Files

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                571 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
                                549 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by RFrosty, 01-28-2026, 06:49 PM
                                0 responses
                                549 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X