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

show daily price limits

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

    show daily price limits

    Hello,

    is there a way how could I create an indicator which would show daily price limits (5% up and down in ETH hours and 7, 13 and 20 % down in RTH period from fixing price). Where fixing price is the volume weighted average price (VWAP) calculated during the 30 seconds of trading from 2:59:30 p.m. – 3:00:00 p.m. CT?
    It seems to be pretty useful in these days and I wonder that NT8 doesn´t contain anything like that...
    Thank you,
    emuns

    #2
    Hello emuns,

    Yes that is likely possible however that is not necessarily something I know of an existing sample. Is there a part of this concept you wanted clarification for in regard to how you might approach that in NinjaScript? It sounds like a few concepts would be needed like making time conditions and doing some various calculations.

    I look forward to being of further assistance.

    JesseNinjaTrader Customer Service

    Comment


      #3
      Hello Jesse,

      yes, what I now find the most difficult is, how to calculate the fixing price?

      Comment


        #4
        Hello emuns,

        Where fixing price is the volume weighted average price (VWAP) calculated during the 30 seconds of trading from 2:59:30 p.m. – 3:00:00 p.m. CT?
        Are you asking to just get the price of the VWAP indicator when the time is between those times?

        You otherwise wouldn't be able to calculate a segment of data like that with an existing indicator. You could just use math to do that if you want to calculate X number of datapoints in some way.


        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Hello Jesse,

          I know how to calculate it, but I´m not sure how to write it in NS?

          I suppose that it should be High, Low, Close of that time divided by three. Multiply this by the volume for that period. And than divide the total result by the volume.

          Should I add 30 second data series and than use condition e.g.: if (ToTime(Time[0]) > ToTime(2, 59, 29) &&
          if (ToTime(Time[0]) < ToTime(3, 00, 01), than do the calculation?

          Comment


            #6
            Hello emuns,

            You would likely need to add a series if you are not using a series that has 30 second intervals so that you can run calculations at that rate. That would also involve using BarsInProgress conditions with your logic.

            You could then use a time condition however I am still not clear on what you wanted to do during that time. If you meant get the indicators value, you would just use the condition and then you would get the value inside that condition. If you otherwise meant to calculate something, you could also do that within the condition you would just likely need to gather the data yourself using the BarsAgo like Close[0] for the data you want and then calculate it.

            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              Hello Jesse,

              thank you for your advice. I have created an indicator, which shows daily price limits on a chart. Unfortunately, the results do not match the values cmegroup puts on its site. The reference price is the same as cmegroup says it is. But the other values differ, though I suppose my calculation is correct.… Could you advise me please? I really have no idea what could be wrong. I´m attaching also todays values which are on cmegroup web and values which shows my indicator:
              Contracts
              Reference Price
              5% Price Limit (Overnight Hours) & 5:00 p.m. to 8:30 a.m. up and down
              7% Price Limit Down only
              13% Price Limit Down only
              20% Price Limit Down only
              E-mini Nasdaq-100 Futures (NQM0) 786500 825925 /
              747075
              731300 683950
              628725
              The Current Trading Day 31.3.2020 has reference price at 7865; 5% above at 8258,25 and 5% below at 7471,75; 7% at 7314,5; 13% at 6842,5 and 20% at 6292.


              Thank you
              emuns
              Attached Files

              Comment


                #8
                Hello emuns,

                I looked at the calculations you are doing and that in general seems correct however I don't have the specific calculation that the CME used to know if that is the same. The calculations you are getting seem to be correct based on general math and getting a percent off from a price. If the CME has the equations used posted somewhere that would be helpful to compare with otherwise this likely won't be able to be known as we don't know specifically what math they used here. They may be using a different value to do the calculation as the prices are not shown with decimal and are shifted to whole values. That should still get the same general value even not using the decimal it would just be shifted like they show in that table.


                I look forward to being of further assistance.
                JesseNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by mgco4you, Today, 09:46 PM
                1 response
                2 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Started by wzgy0920, Today, 09:53 PM
                0 responses
                3 views
                0 likes
                Last Post wzgy0920  
                Started by Rapine Heihei, Today, 08:19 PM
                1 response
                8 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Started by Rapine Heihei, Today, 08:25 PM
                0 responses
                6 views
                0 likes
                Last Post Rapine Heihei  
                Started by f.saeidi, Today, 08:01 PM
                1 response
                9 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Working...
                X