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 wzgy0920, 04-20-2024, 06:09 PM
            2 responses
            26 views
            0 likes
            Last Post wzgy0920  
            Started by wzgy0920, 02-22-2024, 01:11 AM
            5 responses
            32 views
            0 likes
            Last Post wzgy0920  
            Started by wzgy0920, Yesterday, 09:53 PM
            2 responses
            49 views
            0 likes
            Last Post wzgy0920  
            Started by Kensonprib, 04-28-2021, 10:11 AM
            5 responses
            191 views
            0 likes
            Last Post Hasadafa  
            Started by GussJ, 03-04-2020, 03:11 PM
            11 responses
            3,230 views
            0 likes
            Last Post xiinteractive  
            Working...
            X