• 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

PRC Round2TickSize

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

    PRC Round2TickSize

    I am trying to work out if the PRC indicator for NT7 which I downloaded ages ago, can be amended so as to show its pricemarkers Rounded To Ticksize.

    Fx.Set(n,x[1]+sum);
    //DOESNOTWORK: Fx.Set(Instrument.MasterInstrument.Round2TickSize( n,x[1]+sum[0]));


    Attached is the CS file for the indicator. What I tried is at lines 166, 182 and 183.

    Could you let me know if its at all possible to do, and if yes, could you look it over and find what I am doing wrong, then correct me.

    sandman
    Attached Files

    #2
    Hello sandman,

    Thank you for the question.

    The PriceMarker will follow the plot value and also will relate to the instrument being used so it should already follow the general tick size number of decimals. Are you seeing more number of decimals or were you specifically trying to round to the tick size yourself? Can you provide an example of what value you see and what value you are expecting?

    To otherwise format the price marker would require using the FormatPriceMarker override. https://ninjatrader.com/support/help...ightsub=format

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

    Comment


      #3
      Jesse. Thanks. For most instruments it's okay, like RTY, GC, CL. But for some, like ES, NQ and 6J the price marker shows smaller decimal increments than on the DOM which are the ones I would expect to see mirrored in the pricemarker. I hope the attached samples clarify this point.

      As reducing the number of decimals would not resolve this point, I hope you see another possibility to fix this.

      sandman
      Attached Files

      Comment


        #4
        Hello sandman,

        It looks like your attachment did not come through, could you try attaching it again?

        If you are seeing more places the format override should work for that, you could use the Round2TickSize on the passed in value and return the rounded value. Can you try the following to see this this helps?


        Code:
         public override string FormatPriceMarker(double price)
                {
                    return Instrument.MasterInstrument.Round2TickSize(price).ToString();
                }
        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Jesse.
          I have attached the images to my last post. Meantime, I'll try your suggestion. Will let you know. sandman

          Comment


            #6
            Hello sandman,

            In the image you attached I am not able to see the problem, are you saying that the value does not match the TickSize for example you are seeing .26 ending values on the ES instead of .25? Or are you saying that the number of decimals do not match, I am not able to see this if so. Both the images appear to match the superdom in regard to the number of places, the values don't specifically fall into the tick sizes. Can you clarify if I have overlooked the problem here?



            I look forward to being of further assistance.

            JesseNinjaTrader Customer Service

            Comment


              #7
              Jesse.

              Right, the values of the price marker did not specifically fall into the Tick Size which is always properly portrayed in the DOM.

              BUT what you already suggested is what makes it work properly. Thanks for including it in your message as from only the sample reference I would not have been able to figure out to leave the .ToString() blank.

              So, everything's fine. Thank you. Have a good day!

              sandman

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by glennts, Today, 08:24 PM
              0 responses
              3 views
              0 likes
              Last Post glennts
              by glennts
               
              Started by ibabinov, 11-12-2019, 09:50 AM
              3 responses
              66 views
              0 likes
              Last Post NinjaTrader_ShawnB  
              Started by PrimoItch, 05-27-2020, 04:35 PM
              2 responses
              17 views
              0 likes
              Last Post bkonia
              by bkonia
               
              Started by RuthB, Yesterday, 09:41 PM
              1 response
              15 views
              0 likes
              Last Post NinjaTrader_ChrisL  
              Started by Newtrader101, Today, 12:12 PM
              3 responses
              12 views
              0 likes
              Last Post NinjaTrader_ShawnB  
              Working...
              X