Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

calculate Open range values issue

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

    calculate Open range values issue

    Hi,

    I am adding different time frames in my strategy and calculate open range values accordingly these time frames. If I set Data Value less than These time frames then open range values are calculated correctly but if i set Data Value greater than these time frames then these values are not calculated. Strategy calculate only those time frame values that are equal or greater than this Data value.Can any one tell me what the issue is? and how can I solve this?
    strategy is running on CalculateOnBarClose = false

    Thanks,
    Irfan

    #2
    Hello Irfan,

    How are you calculating your open range values? Are you using a Time Filter?
    JCNinjaTrader Customer Service

    Comment


      #3
      JC, I want a script to draw a box on the chart automatically for the first 20 minute range. Is this possible? Assume RTH. thanks

      Comment


        #4
        Hello Algogeek,

        Welcome to the NinjaTrader Support Forums!

        Yes, this is definitely possible using NinjaScript. There is a script that is close to what you are looking for that displays the opening range of a chart based on the Start and End Time you put inside of the Indicator that you may view at the following link.


        To Import
        1. Download the file to your desktop
        2. From the Control Center window select the menu File > Utilities > Import NinjaScript
        3. Select the downloaded file

        Note that on any files that say "File already exists on your PC" that start with an "@" symbol are the ones that came preloaded inside of NinjaTrader so you would say "No" so that you do not override those files.


        Happy to be of further assistance.
        JCNinjaTrader Customer Service

        Comment


          #5
          Hi ,

          I am using
          If(BarsArray[timeFrameValue][0].FirstBarOfSession) to calculate these values but this call only for primary data series .

          Comment


            #6
            Hello Irfan,

            Originally posted by rana.irfan View Post
            If(BarsArray[timeFrameValue][0].FirstBarOfSession)
            BarsArray should only be able to take 1 bracket "[]" for the index as shown in our Help Guide below.


            While, I am not sure how you are getting this to compile this will still only return a true or false statement when the first bar of a session is true. How are you trying to determine the open range from this?
            JCNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            650 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            370 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            109 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            574 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            576 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X