Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Break at EOD

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

    Break at EOD

    Hello, is there a way to be able to default break at eod to be disabled depending on the bar type being loaded?
    Say for PNF or for a custom bar type is there a way to access and set the value of this for bar series?
    If not can this be raised as a feature request or if it has please add my vote
    thanks

    #2
    Hello soulfx,

    Thank you for your post.

    Yes, you would need to use one of the overloads that allows you to specify IsResetOnNewTradingDay. Here's what those would be for a standard data series:

    AddDataSeries(string instrumentName, BarsPeriod barsPeriod, string tradingHoursName, bool? isResetOnNewTradingDay)
    AddDataSeries(string instrumentName, BarsPeriod barsPeriod, int barsToLoad, string tradingHoursName, bool? isResetOnNewTradingDay)

    Specifically for PnF bars:

    AddPointAndFigure(string instrumentName, Data.BarsPeriodType baseBarsPeriodType, int baseBarsPeriodTypeValue, int boxSize, int reversal, Data.PointAndFigurePriceType pointAndFigurePriceType, Data.MarketDataType marketDataType, string tradingHoursName, bool? isResetOnNewTradingDay)

    You can find more in our section on AddDataSeries here:



    Please let us know if we may be of further assistance to you.

    Comment


      #3
      thanks for that - how would you declare that in custom bar type and or when setting the data series
      example - i select a custom bar type from the drop down of types .... how can i get the custom series to set the break at eod to true or false - the default always seems to be true?

      Comment


        #4
        Hello soulfx,

        Thank you for your reply.

        You can add a custom BarsType which is installed on your system by casting the registered enum value for that BarsPeriodType. For example: AddDataSeries((BarsPeriodType)14, 10);

        When adding an additional data series in your script, you can specify optional BarsPeriod values (such as Value2) of a custom BarsType in the BarsPeriod object initializer. For example: AddDataSeries(new BarsPeriod() { BarsPeriodType = (BarsPeriodType)14, Value = 10, Value2 = 20 });

        You would need to use that structure with one of the overloads that accepts the IsResetOnNewTradingDay overload. That would look like this:

        AddDataSeries("NQ 06-20", new BarsPeriod() { BarsPeriodType = (BarsPeriodType)14, Value = 10, Value2 = 20 }, "CME US Index Futures RTH", true);

        Note you will need to know the registered bars period value for the bars type.

        Please let us know if we may be of further assistance to you.

        Comment


          #5
          Hello thanks for the reply but i think you misunderstood my question and or i didnt make it clear
          When i open the data series dialogue and select my custom bar type from the drop downs - i want the break at eod field (in the data series window - not the adddataseries) to set to false or disabled. Ie nothing to do with adddataseries in a ninjascript. I want a way to associate the custom bar type so it will set the default for break at eod as i determine,
          It is annoying to have to uncheck it each time and so wanted to know if there was a means to accomplish this
          thanks

          Comment


            #6
            Hello soulfx,

            Thank you for your reply.

            You can set defaults for settings for specific bars types within the Data Series window. To do so, set your settings for that particular bar type as you'd like them defaulted to. Once complete, look at the bottom of this window. Right above the Apply button you should see "Preset barstypename". Click this, then click save to save those defaults.

            The next time you open a chart and select that bars type, your defaults should automatically appear.

            Please let us know if we may be of further assistance to you.

            Comment


              #7
              Ok thanks i see that and i guess this will need to be part of the process. There isnt a way for the bar type selection to set the setting of break at eod to false/disabled ; ie when the type is selected. I thought perhaps there was something in the code for a custom bar that could accomplish this without needing to save presets .....
              Would this be possible as a feature request?

              Comment


                #8
                Hello soulfx,

                Thank you for your patience.

                I've heard back from our development team on this and they said there would not be a supported way to set Break at EOD when the bars type is selected as the already-initialized bars object is passed into the BarsType and its properties would not be able to be set within the Bars Type.

                I have created a feature request to allow setting a default Break at EOD from the Bars Type. This request is being tracked under the number SFT-4912.

                As with all feature requests, interest is tracked before implementation is considered, so we cannot offer an ETA or promise of fulfillment. If implemented, it will be noted in the Release Notes page of the Help Guide.

                Release Notes — https://ninjatrader.com/support/help...ease_notes.htm

                Please let us know if we may be of further assistance to you.

                Comment


                  #9
                  Thanks for feedback. I wonder in your feature request if this means that the ability to set a default Break at EOD value would be settable in the code for the custom bar type. Ie at the time of instantiation in the code that uses it?
                  thanks

                  Comment


                    #10
                    Hello soulfx,

                    This is Jim responding on behalf of Kate who is out of the office at this time.

                    Yes, this is how the feature request is described.

                    Let us know if there is anything else we can do to help.

                    Comment


                      #11
                      Hello

                      I have read all about EOD in this forum and I have a question. I have created a custom barstype that works ok on charts. Now I would like to use it as a secondary serie in a indicator, and it still works ok on charts with only one session, but it does not when there are two or more sessions although primary serie in chart is EOD enabled...
                      Any clue or example to accomplish this? I tried to use an overload but it does not compile. Post #11 refers to HeikenAshiBarsType line #373 but maybe there have changed since then...

                      AddDataSeries(new BarsPeriod()
                      {
                      BarsPeriodType = (BarsPeriodType)81, // myBarsID
                      Value = mySize, // My Size

                      });

                      Thanks in advanced
                      Last edited by Impeesa; 10-22-2021, 06:27 AM.

                      Comment


                        #12
                        Hello Impeesa,

                        Thank you for your reply.

                        What is the text of the compile error you receive? Can you supply an example that tries to call the bars type and fails? Does calling it like this work?:

                        AddDataSeries((BarsPeriodType)81, mySize);

                        Thanks in advance; I look forward to assisting you further.

                        Comment


                          #13
                          Hello Kate

                          Attached is bartype and a simple indicator. There is also a NQ 1 minute chart "CME US Index Futures RTH".
                          First day indicator wait till second impReversal bar is closed to paint chart bars, but in third one it does not and previous day impReversal bar are considered till second bar of day is closed.

                          Sincerely,
                          Attached Files

                          Comment


                            #14
                            Hello Impeesa,

                            Thank you for your reply.

                            I would expect that this would continue to use the prior day's values until the lowOR and highOR are reset to the open after the first bar of the session closes for the added secondary series. Since this isn't a time based bar, the time at which that occurs will vary. I would suggest instead to run the indicator on each tick or on price change so you can update those values on the first tick of the first bar of the session if you don't want it to continue to calculate off prior day values.

                            Please let us know if we may be of further assistance to you.

                            Comment


                              #15
                              Hello Kate

                              Thanks for your reply. Running on each tick or on price change also does not work.

                              Despite I have made one change and it is enough to me. Maybe another user finds a smarter solution. I attach the code.

                              Sincerely,
                              Attached Files

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by argusthome, 03-08-2026, 10:06 AM
                              0 responses
                              85 views
                              0 likes
                              Last Post argusthome  
                              Started by NabilKhattabi, 03-06-2026, 11:18 AM
                              0 responses
                              48 views
                              0 likes
                              Last Post NabilKhattabi  
                              Started by Deep42, 03-06-2026, 12:28 AM
                              0 responses
                              29 views
                              0 likes
                              Last Post Deep42
                              by Deep42
                               
                              Started by TheRealMorford, 03-05-2026, 06:15 PM
                              0 responses
                              32 views
                              0 likes
                              Last Post TheRealMorford  
                              Started by Mindset, 02-28-2026, 06:16 AM
                              0 responses
                              67 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Working...
                              X