• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

End of day - intraday indicators

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

    End of day - intraday indicators

    Hi
    I am a new ADD-ON partner (www.elitetrader.com.br).
    I am developing a series of new indicators all based on range and are initialized every beginning of a new trading day.
    I would like to know when the trading day ends ???? (eg ES) because sometimes the day ends at 20:15, 19:15 and 18:15.
    Thank you for your attention

    #2
    Hello,

    Thank you for the inquiry.

    You can find the Session Template for each instrument using the Instrument manager, and then reference that in the Session manager to see the trading hours. Here are the steps for the ES:

    Click Tools -> Instrument Manager
    In the text box Name type ES and click Search
    double click the ES future
    look for Session Template, the default for ES is listed as "CME US Index Futures ETH"
    Click Cancel
    Click Cancel
    Click Tools -> Session Manager
    Click the drop down and look for the session name and select it.

    This will show the session hours that will be used when you select <Use instrument settings> for the session template.

    Please let me know if I may be of additional assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks Jesse for your quick reply.
      I need to access the "end of trading sessions time" in ninjascript, because the indicator is re-started at the beginning of trading session.
      I'm manually configuring the "end of days" but as I want to use in all assets the system has to be set automatically as equal to NinjaTrader plots the vertical grid lines.
      Basically I want to access the id (index) which are plotted on the vertical grid lines NinjaTrader.
      Example code:
      Code:
      			if (CurrentBar == 0)
      			{
      				Maxima[0] = High[0];
      				Minima[0] = Low[0];
      //				FirstTradeOfDay = 1;
      			}
      			else
      			{
      				if ((ToTime(Time[0]) >= 181500 &&
      					ToTime(Time[1]) <= 181500) ||
      					(Math.Abs(Close[0] - Close[1]) > 4*TamanhoRange && //gap que identifica fim do dia
      					ToDay(Time[1]) != ToDay(Time[0])))
      				{
      					Maxima[0] = High[0];
      					Minima[0] = Low[0];
      //					FirstTradeOfDay = 1;
      				}
      				else
      				{
      					Maxima[0] = Math.Max(Maxima[1],High[0]);
      					Minima[0] = Math.Min(Minima[1],Low[0]);
      					if (Maxima[0] > Maxima[1])
      					{
      						UltimoMovIntraday = 1;
      					}
      					else if (Minima[0] < Minima[1])
      					{
      						UltimoMovIntraday = -1;
      					}
      						
      				}
      			}
      In the figures you can see how it should be:
      F - correct indicator is booting;
      E - correct, "End of Day" is the 18:15
      D - not right "End of Day" is the 19:15
      C - not correct, the indicator is starting before the "End of Day"
      A - not right "End of Day" is the 20:15
      B - not correct, the indicator is starting before the "End of Day"

      Thanks for listening
      Attached Files

      Comment


        #4
        Hello,

        For accessing the session times, you could look into using this:
        http://ninjatrader.com/support/helpG...htsub=beginend

        GetNextBeginEnd gets the Start and End of the session as DateTime object which can be compared against Time[0] for any needs.

        In the example shown in the help guide, this would apply to the current session of the instrument so as long as the session hours for that instrument are what you need, this should return the correct values you need.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Thank you Jesse

          Great

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by PeterGolz, 01-17-2020, 10:42 AM
          11 responses
          71 views
          0 likes
          Last Post reubenlasky  
          Started by utilizator, Today, 11:36 AM
          0 responses
          4 views
          0 likes
          Last Post utilizator  
          Started by EnveousColnago, Today, 07:24 AM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_ShawnB  
          Started by tornadoatc, Today, 10:31 AM
          0 responses
          3 views
          0 likes
          Last Post tornadoatc  
          Started by EnveousColnago, Yesterday, 05:43 PM
          5 responses
          30 views
          0 likes
          Last Post EnveousColnago  
          Working...
          X