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

Can someone turn this thinkscript into a ninjascript. 5PM CST OHL and Previous Day

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

    Can someone turn this thinkscript into a ninjascript. 5PM CST OHL and Previous Day

    Ninja's built in previous day OHLC and current day OHLC begin plotting at midnight. As we know, the futures new trading day begins 5PM CST and not midnight. I have a thinkscript I use on thinkorswim that plots all this for me and has chart bubbles to identify the lines with the ability to set colors etc. It would be cool if some genorus thinkscript developer would take this close and make a ninjascript that will do the same. Code is attached.


    Click image for larger version

Name:	ninjascript idea.png
Views:	79
Size:	116.3 KB
ID:	1301257

    #2
    Originally posted by Option Whisperer View Post
    Ninja's built in previous day OHLC and current day OHLC begin plotting at midnight. As we know, the futures new trading day begins 5PM CST and not midnight.
    Huh? Mine doesn't do that.

    These indicators start plotting from the start of the
    session, as defined by Data Series > Trading Hours
    setting -- which is a per chart setting.

    I bet yours is set to 'Default 24 x 7', which causes the
    start of the session to be midnight.

    Change it to '<Use instrument settings>' and also
    make sure the instrument itself is set to the default,
    and then it should start plotting at the normal session
    open.

    Have you tried that?



    -=o=-

    Make sure your chart templates are set to use the
    default '<Use instrument setting>' so that all new
    charts automatically define the session correctly.

    Comment


      #3
      Hello Option Whisperer,

      Thanks for your post.

      bltdavid is correct, the Prior Day OHLC and Current Day OHLC indicators that come with NinjaTrader plot based on the start of the session defined by the Trading Hours template you have the Data Series set to use.

      The <Use Instrument Settings> Trading Hours template option in the Data Series window could be used so that the data series on the chart uses the default Trading Hours for the instrument you are using.

      See the help guide documentation below for more information.

      Trading Hours: https://ninjatrader.com/support/help...urs_window.htm
      Working with Chart Data Series Properties: https://ninjatrader.com/support/help...riesParameters
      Brandon H.NinjaTrader Customer Service

      Comment


        #4
        Originally posted by bltdavid View Post

        Huh? Mine doesn't do that.

        These indicators start plotting from the start of the
        session, as defined by Data Series > Trading Hours
        setting -- which is a per chart setting.

        I bet yours is set to 'Default 24 x 7', which causes the
        start of the session to be midnight.

        Change it to '<Use instrument settings>' and also
        make sure the instrument itself is set to the default,
        and then it should start plotting at the normal session
        open.

        Have you tried that?



        -=o=-

        Make sure your chart templates are set to use the
        default '<Use instrument setting>' so that all new
        charts automatically define the session correctly.
        Thanks. This was on an NKD chart. The only way to get things to work right on that chart is to have it set to 24/7. But I looked at my other charts and it does correctly plot overnight open on instrument settings. Not sure what it is about NKD that we have to have the data series different.

        Comment


          #5
          Originally posted by Option Whisperer View Post
          This was on an NKD chart. The only way to get things to work right on that chart is to have it set to 24/7.
          How so?

          Is that due to 'things' you've purchased?

          Using 'Default 24/7' for real-time charts means your
          charts are being sabotaged. That is, that setting will
          cause your charts to lie to you, because the chart is
          lying to the indicators.

          If you've purchased indicators that require that setting,
          then unfortunately that setting will screw with several
          normal, useful indicators that are standard with NT.

          Caveat emptor.



          Comment


            #6
            Hello Option Whisperer,

            Thanks for your notes.

            When opening an NKD 06-24 chart with the Trading Hours set to <Use instrument settings> and applying the Current Day OHL indicator and the Prior Day OHLC indicator to the chart, I see the indicators calculating on the chart from the start of the Trading Hours session as expected.

            See the attached screenshots.
            Attached Files
            Brandon H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by ETFVoyageur, Today, 02:15 AM
            0 responses
            8 views
            0 likes
            Last Post ETFVoyageur  
            Started by Board game geek, Today, 01:34 AM
            0 responses
            6 views
            0 likes
            Last Post Board game geek  
            Started by morrnel, 05-12-2024, 06:07 PM
            3 responses
            42 views
            0 likes
            Last Post wzgy0920  
            Started by FishTrade, Yesterday, 11:11 PM
            0 responses
            7 views
            0 likes
            Last Post FishTrade  
            Started by Austiner87, Yesterday, 03:42 PM
            1 response
            22 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Working...
            X