Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Price marker format for T-Notes Futures Pivot Points

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

    #16
    Do not understand this answer. Does it mean that development accepts that the axis shifts, or will they solve problem with one of the next releases?

    Originally posted by NinjaTrader_RyanM View Post
    Hi Harry,

    Updating here as this was found to be expected. Please see my previous reply.

    Comment


      #17
      Sorry for the confusion, Harry. I updated the thread prematurely. Development is still looking into this and I will post again here as soon as I have more information.
      Ryan M.NinjaTrader Customer Service

      Comment


        #18
        Harry,

        Please try one of these in FormatPriceMarker() instead:

        Code:
        return Gui.Chart.ChartControl.FormatYValue(price);
        Code:
        return price.ToString(Gui.Globals.GetTickFormatString(TickSize));
        The white space will appear if the formatting pushes it out to require more space. This is unavoidable, but with the above it will take the least amount of space. The white space will remain on the chart even if you remove the indicator too. This persisted white space will be resolved in the next version.
        Josh P.NinjaTrader Customer Service

        Comment


          #19
          How add Plot Name ( lines name ) in Price Marker, if we have many lines ?

          DrawText not good, for some purposes.
          Last edited by TCust; 01-21-2011, 11:25 AM.

          Comment


            #20
            Hello TCust,

            Unfortunately I'm not aware of a way to do this. You can easily return the name of the indicator. I'm not sure if there's a way to conditionally change FormatPriceMarkers based on the specific plot used. There's no supported NinjaScript properties that offer this.
            Ryan M.NinjaTrader Customer Service

            Comment


              #21
              Originally posted by NinjaTrader_Josh View Post
              Harry,

              Please try one of these in FormatPriceMarker() instead:

              Code:
              return Gui.Chart.ChartControl.FormatYValue(price);
              Code:
              return price.ToString(Gui.Globals.GetTickFormatString(TickSize));
              The white space will appear if the formatting pushes it out to require more space. This is unavoidable, but with the above it will take the least amount of space. The white space will remain on the chart even if you remove the indicator too. This persisted white space will be resolved in the next version.
              Hi Josh, thanks for the information, I will try your suggestions and further wait for the next release.

              Comment


                #22
                Originally posted by NinjaTrader_Josh View Post
                Harry,

                Please try one of these in FormatPriceMarker() instead:
                Code:
                return price.ToString(Gui.Globals.GetTickFormatString(TickSize));
                This solution worked for all instruments, but there is a general problem with interest rate futures, which are quoted in 1/32, 1/64 or 1/128.

                As long as no indicators are applied to a default chart, the y-axis in the correct position. As soon as you apply an indicator - no matter which one - two problems can be observed:

                (1) the format of the price marker of the indicator is not correct
                (2) the y-axis shifts to the left

                Below a test with ZN. First opened a default chart 15 min. Then applied a default EMA. You will notice the false format and the shifted y-axis.
                Attached Files

                Comment


                  #23
                  I have now modified the indicator code of the EMA to address the problem - but, then I would have to add that piece of code to all my indicators to make them display properly on bond and treasury note futures.

                  Code:
                  public override string FormatPriceMarker(double price)
                  {
                  	double trunc = Math.Truncate(price);
                  	int fraction = Convert.ToInt32(320 * Math.Abs(price - trunc) - 0.0001); // rounding down for ZF and ZT
                  	string priceMarker = "";
                  	if (TickSize == 0.03125) 
                  	{
                  		fraction = fraction/10;
                  		if (fraction < 10)
                  			priceMarker = trunc.ToString() + "'0" + fraction.ToString();
                  		else 
                  			priceMarker = trunc.ToString() + "'" + fraction.ToString();
                  	}
                  	else if (TickSize == 0.015625 || TickSize == 0.0078125)
                  	{
                  		if (fraction < 10)
                  			priceMarker = trunc.ToString() + "'00" + fraction.ToString();
                  		else if (fraction < 100)
                  			priceMarker = trunc.ToString() + "'0" + fraction.ToString();
                  		else	
                  			priceMarker = trunc.ToString() + "'" + fraction.ToString();
                  	}
                  	else
                  		priceMarker = price.ToString(Gui.Globals.GetTickFormatString(TickSize));
                  	return priceMarker;
                  }
                  Maybe not elegant, but it seems to work. I attach the modified indicator which uses this piece of code.
                  Attached Files
                  Last edited by Harry; 01-22-2011, 06:54 PM. Reason: code replaced, as it had a minor bug

                  Comment


                    #24
                    FormatPriceMaker falls down when indicator has more than one plot

                    FormatPriceMarker is a very useful technique. But if an indicator has more than one plot, FormatPriceMarker returns the same string (value and format) for all of them, as indicated in a previous post.

                    This is something that cries out to be addressed. Would be nice to be able to use conditionals to apply different values and formats to the different plots, or to have the FormatPriceMarker method accept a parameter to make it specific to a particular plot.

                    Comment


                      #25
                      Y Axis of Indicator adapted to Interest Rate Futures

                      Is it possible to format the y-axis for an indicator, such as to show 32nds for interest rate futures?

                      For example, if I display the average true range for bonds, I might like to display this as 23/36 instead of 0.0731, which would be in line with the first indicator panel.

                      By using FormatPriceMarker, I can display the current indicator value correctly, see chart below. But what about the y-axis? Is it possible to format the y-axis of the indicator in the same way as it has been done for the main panel?
                      Attached Files

                      Comment


                        #26
                        Hi Harry,

                        A work around is available for this in the following post.
                        Last edited by NinjaTrader_RyanM1; 04-26-2011, 09:29 AM.
                        Ryan M.NinjaTrader Customer Service

                        Comment


                          #27
                          We were able to identify this as a work around to get Y axis displayed in tick for an indicator panel:

                          - add data series on same scale and panel as indicator
                          - set colors for 'candle outline', 'up color', 'down color' and 'wick' to 'transparent'
                          - set the 'Label' property of the data series to "" (makes label in panel header disappear)
                          --> y axis looks and behaves like there is a bar series on panel & scale (which actually is the case)
                          Ryan M.NinjaTrader Customer Service

                          Comment


                            #28
                            Yes, I have used this already for some indicators on the main panel, will try whether it works. I understand that a transparent bar series will not trigger an adjustment of the vertical scale, as I only want to scale the indicator (value 1) and not the bond (value 100).

                            Originally posted by NinjaTrader_RyanM View Post
                            We were able to identify this as a work around to get Y axis displayed in tick for an indicator panel:

                            - add data series on same scale and panel as indicator
                            - set colors for 'candle outline', 'up color', 'down color' and 'wick' to 'transparent'
                            - set the 'Label' property of the data series to "" (makes label in panel header disappear)
                            --> y axis looks and behaves like there is a bar series on panel & scale (which actually is the case)

                            Comment


                              #29
                              Custom y axis formatting of multiple plots

                              Once again am requesting a way to do the following:

                              In an indicator that has more than one plot, to be able to use FormatPriceMarker to display properly formatted values for all of the plots, not just one.

                              I believe there would have to be different FormatPriceMarker statements for each of the plots, not sure if that can be done.

                              Can anyone can figure out a way to do this, Thanks

                              Comment


                                #30
                                Hello Ricam,

                                Currently, you would have to use multiple indicators as FormatPriceMarkers() will apply to all charts. There would have to be a change here to allow different format per plot. Thank you for taking the time to provide us with valuable feedback, we have inserted your suggestion into our tracking system and assigned it ID # 715.
                                Ryan M.NinjaTrader Customer Service

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by jxs_xrj, 01-12-2020, 09:49 AM
                                6 responses
                                3,290 views
                                1 like
                                Last Post jgualdronc  
                                Started by Touch-Ups, Today, 10:36 AM
                                0 responses
                                8 views
                                0 likes
                                Last Post Touch-Ups  
                                Started by geddyisodin, 04-25-2024, 05:20 AM
                                11 responses
                                61 views
                                0 likes
                                Last Post halgo_boulder  
                                Started by Option Whisperer, Today, 09:55 AM
                                0 responses
                                8 views
                                0 likes
                                Last Post Option Whisperer  
                                Started by halgo_boulder, 04-20-2024, 08:44 AM
                                2 responses
                                24 views
                                0 likes
                                Last Post halgo_boulder  
                                Working...
                                X