Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

symbol session

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

    symbol session

    Hi,
    pic1 shows the setup for NQ
    and pic 2 the session utilized.
    I got an execution at 9:35 pm yesterday, although
    the session stops at 3:15 CST. How can I prevent
    executions outside the session defined?

    Thanks,
    Attached Files

    #2
    Hello trend,

    Session templates will only set the times used in your chart to display data. It will not exclude executions from occurring if you have an active order.

    You would need to cancel all active orders after 3:15 PM CST.

    Comment


      #3
      Hi Jason,
      can you guide as to how to amend the script
      in order to observe the time sessions for each symbol?

      Thanks,

      Comment


        #4
        Hello trend,

        You can modify session templates by clicking the Edit button.

        If you go to Control Center-->Help-->Help, you will find documentation how to use the Session Manager under 'Operations'.

        Comment


          #5
          Wasn't clear,
          I meant to have sthg in the beggining of the OnBarUpdate:

          protectedoverridevoid OnBarUpdate()
          {
          DateTime sessionBegin;
          DateTime sessionEnd;
          BarsArray[
          0].Session.GetNextBeginEnd(Time[0], out sessionBegin, out sessionEnd);

          to prevent from executing an order in out of session times

          Comment


            #6
            trend,

            There is nothing you need to do in the code. Simply apply this particular session template onto the chart of the instrument you are using before applying the strategy onto the chart. With the session template applied no data outside of the session definitions will be processed and that will prevent any strategy logic from processing during those times.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Hi Josh,
              I test by applying strategies in the Strategy tab (not thru charts)
              In the Instrument List I have several symbols with different Sessions.
              For example, one symbol's session could start at 10:00 and another one at 10:05.

              In the Strategies tab for DataSeries I use the Instrument List
              with Type Minute. For Session Template I have
              <Use Instrument settings>

              For example, for a Value of 10 (Minutes) and for 2 symbols would the signals be generated at 10:00-10:10-10:20 and 10:05-10:15-10:25, respectively?

              Does the Instrument List has to have the same Session Template
              for all Instruments in the List? If yes, how can you mix in the Strategies
              Tab symbols with different Sessions?

              (This is the scenario where I got signals for one Symbol out its Sessions EndTime.)

              Thanks,

              Comment


                #8
                Hello trend,

                Yes, if 'Calculate on bar close' is set to True for the strategies. They will not trigger signals at 10:00 and 10:05 respectively, since NinjaTrader time stamps bars at the close. Once the first bar of the session closes, trade signals can be triggered.

                The instruments in the instrument list you like to run your strategy, do not have to use the same session template. If 'Session template' is set to <Use instrument settings>, it will use the session template setup in the Instrument Manager for each instrument.

                Comment


                  #9
                  Hi Josh,
                  I've tried many symbols and I don't have a problem with
                  backadjusting historical when the Sessions have rows where the
                  Startdate and EndDate are the same, but it seems there is
                  a problem when the Session's EndDate extends to the folowing day,
                  e.g.
                  Sunday 5:00 pm --- Monday 12:30 am
                  Monday 5:00 pm --- Tuesday 12:30 am
                  .....

                  Is there any workaround on this? Should I delete the Daily data
                  an try to backadjust on charts with minute data?

                  Also, how to alter the number of decimals in the y-axis?

                  Thanks,

                  Comment


                    #10
                    Hello trend,

                    Can you please clarify what exact issue you experience when you use such settings in your session template.

                    The number of decimals depends on the tick size setting in the Instrument Manager. However we recommend not to change this setting, since it could cause issues when trading the instrument.

                    Comment


                      #11
                      Hi Jason,
                      I backadjusted historical data for many symbols,
                      by downloading minute data, exporting and reimporting with
                      "Generate Daily Data..." set. Then once you create a daily
                      chart the offset (which I blanked prior to this) is set automatically.
                      After the offset is set I check the Daily data in the Historical Manager
                      (under Edit) to make sure that the offset is correct. For example,
                      for a rollover date 3/15 I check the close to close difference on the
                      day prior to the 3/15 (i.e. 3/14 or if is weekend before).

                      For symbols in the SFE exchange the process filled the offset but
                      I cannot figure out which values it used. The Session for these symbols
                      (e.g. XT, YT.. ) is attached in Pict 1. The difference with this Session
                      compared to the various Sessions used for the other symbols, is that the
                      Begin and End Date for each Row are different.

                      Thanks,
                      Attached Files

                      Comment


                        #12
                        Unfortunately I am not still not sure what issue you experience. What is referred as 'offset'?

                        Why do you 'backadjust' the data. After you exported the data, do you modify it before you re-import it?

                        Comment


                          #13
                          Referring to merge backadjusted futures market data

                          Comment


                            #14
                            trend,

                            If I understood you correctly, the daily bars would have been generated by the session template selected for that instrument in the Instrument Manager.
                            Josh P.NinjaTrader Customer Service

                            Comment


                              #15
                              Hi Josh,
                              the daily data are created from the minute data,
                              as I reimported the minute data back in with the "Generate Daily.."
                              option checked. The thing is that I cannot tie up with the
                              daily data to verify the offset that the program calculates
                              once you create a daily chart. I suspect it has sthg
                              to do with the Session as it is carried over to the next day
                              as in the Picture in the previous post. Again I didn't have any
                              program verifying the offset with many other symbols that their
                              sessions has begin-end dates with the same weekday.

                              Thanks,

                              Comment

                              Latest Posts

                              Collapse

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