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 adeelshahzad, Today, 03:54 AM
            5 responses
            32 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by stafe, 04-15-2024, 08:34 PM
            7 responses
            32 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by merzo, 06-25-2023, 02:19 AM
            10 responses
            823 views
            1 like
            Last Post NinjaTrader_ChristopherJ  
            Started by frankthearm, Today, 09:08 AM
            5 responses
            21 views
            0 likes
            Last Post NinjaTrader_Clayton  
            Started by jeronymite, 04-12-2024, 04:26 PM
            3 responses
            43 views
            0 likes
            Last Post jeronymite  
            Working...
            X