• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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 myrtienguyen, Today, 02:18 AM
                0 responses
                2 views
                0 likes
                Last Post myrtienguyen  
                Started by WHICKED, Yesterday, 09:03 PM
                1 response
                15 views
                0 likes
                Last Post Emma1
                by Emma1
                 
                Started by oleotrim, Yesterday, 11:29 PM
                1 response
                11 views
                0 likes
                Last Post Emma1
                by Emma1
                 
                Started by Heavyweight_Prop, Yesterday, 09:06 PM
                1 response
                10 views
                0 likes
                Last Post NinjaTrader_EricB  
                Started by saltminer, Yesterday, 05:49 PM
                0 responses
                10 views
                0 likes
                Last Post saltminer  
                Working...
                X