Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Problems on PriorDayOHLC().PriorClose[0]

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

    Problems on PriorDayOHLC().PriorClose[0]

    Hi

    the below is the code, but when I try to print out the Close of ES. The number is very different from the close. Can you advise on any setting? FYI, my default session ends 04:15.

    thx

    Add("ES 09-10", PeriodType.Minute, 5);

    if (BarsInProgress == 1)
    {
    //ES_INT = Close[CurrentBar - Bars.GetBar(new DateTime(4,15,0))];
    ES_INT =PriorDayOHLC().PriorClose[0];

    #2
    Hi NingNing,

    Let's take a step back, does that call work on your primary series, in a single series script?
    TimNinjaTrader Customer Service

    Comment


      #3
      yes, I realize that these 2 instrument in different time zone, may be I can not ge the priorsession on 2 different time zone, any suggestion of code how to get the current session close()?

      Comment


        #4
        Hi NingNing,

        What primary series, and Session Templates are you using? I'd like to test this on my end.
        TimNinjaTrader Customer Service

        Comment


          #5
          hI

          I am trying HSI 07-10 and ES 09-10, please let me know if you get it and how you set the session for these elements, many thanks

          Comment


            #6
            Hi NingNing,

            Unfortunately I do not have a subscription to that instrument to test.

            Why are you suspecting the time-zones?
            Have you tried this on other instruments? With the same time-zone or differing ones?
            TimNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by funk10101, Today, 12:02 AM
            0 responses
            3 views
            0 likes
            Last Post funk10101  
            Started by gravdigaz6, Yesterday, 11:40 PM
            1 response
            8 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by MarianApalaghiei, Yesterday, 10:49 PM
            3 responses
            10 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by XXtrader, Yesterday, 11:30 PM
            0 responses
            4 views
            0 likes
            Last Post XXtrader  
            Started by love2code2trade, 04-17-2024, 01:45 PM
            4 responses
            28 views
            0 likes
            Last Post love2code2trade  
            Working...
            X