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

Plotted line does not go over midnight

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

    Plotted line does not go over midnight

    Hi NT experts,
    I am trying to plot the range high and low of certain period of one day on the chart. The plot stops at midnight.

    If i specify to plot beyond midnight, then the plot won't carry the range values in the previous day. I also tried to use Dataseries but the result is the same.

    Any suggestions will be welcome.

    I attached the code and any FOREX instrument will be good for testing it.

    Attached Files

    #2
    binwang2,

    Unfortunately I cannot dissect your code indepth due to bandwidth reasons, but if a midnight cutoff causes you issues it could be that your use of your DateTime manipulations rolling forward to a new date is changing your range values. Perhaps try locking them down somehow?
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      anyone can help?I have same issues

      Comment


        #4
        Are you using 'Default 24x7' for your session template?

        (In NT8, 'Session Template' was changed to 'Trading Hours')

        Right click in your chart -> Data Series
        Try changing to '<Use instrument settings>'
        Last edited by bltdavid; 02-09-2022, 05:56 AM.

        Comment


          #5
          i always set it to <Use instrument settings>'

          Comment


            #6
            Hello stantenlee,

            I took a look at the code however nothing obvious sticks out which would cause the described outcome. For this item you would need to add some prints into the logic to see how the original posters script works and then make modifications where needed.

            JesseNinjaTrader Customer Service

            Comment


              #7
              this indicator let you carry over the range values from n days ago. I set it to 0 day so you can see how it looks when you start changing it to 1,2,3 ..n day


              Originally posted by binwang2 View Post
              Hi NT experts,
              I am trying to plot the range high and low of certain period of one day on the chart. The plot stops at midnight.

              If i specify to plot beyond midnight, then the plot won't carry the range values in the previous day. I also tried to use Dataseries but the result is the same.

              Any suggestions will be welcome.

              I attached the code and any FOREX instrument will be good for testing it.
              Attached Files

              Comment


                #8
                did not realize you are on NT7, here is NT7 version
                Attached Files

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by ct, 05-07-2023, 12:31 PM
                6 responses
                202 views
                0 likes
                Last Post wisconsinpat  
                Started by kaywai, Today, 06:26 AM
                0 responses
                1 view
                0 likes
                Last Post kaywai
                by kaywai
                 
                Started by kevinenergy, 02-17-2023, 12:42 PM
                118 responses
                2,778 views
                1 like
                Last Post kevinenergy  
                Started by briansaul, Today, 05:31 AM
                0 responses
                9 views
                0 likes
                Last Post briansaul  
                Started by traderqz, Yesterday, 12:06 AM
                11 responses
                28 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Working...
                X