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 bortz, 11-06-2023, 08:04 AM
            47 responses
            1,603 views
            0 likes
            Last Post aligator  
            Started by jaybedreamin, Today, 05:56 PM
            0 responses
            8 views
            0 likes
            Last Post jaybedreamin  
            Started by DJ888, 04-16-2024, 06:09 PM
            6 responses
            18 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by Jon17, Today, 04:33 PM
            0 responses
            4 views
            0 likes
            Last Post Jon17
            by Jon17
             
            Started by Javierw.ok, Today, 04:12 PM
            0 responses
            12 views
            0 likes
            Last Post Javierw.ok  
            Working...
            X