Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Price marker format for T-Notes Futures Pivot Points
Collapse
X
-
Harry,
Please try one of these in FormatPriceMarker() instead:
Code:return Gui.Chart.ChartControl.FormatYValue(price);
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.Code:return price.ToString(Gui.Globals.GetTickFormatString(TickSize));
Josh P.NinjaTrader Customer Service
Comment
-
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
-
Hi Josh, thanks for the information, I will try your suggestions and further wait for the next release.Originally posted by NinjaTrader_Josh View PostHarry,
Please try one of these in FormatPriceMarker() instead:
Code:return Gui.Chart.ChartControl.FormatYValue(price);
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.Code:return price.ToString(Gui.Globals.GetTickFormatString(TickSize));
Comment
-
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.Originally posted by NinjaTrader_Josh View PostHarry,
Please try one of these in FormatPriceMarker() instead:
Code:return price.ToString(Gui.Globals.GetTickFormatString(TickSize));
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.
Comment
-
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.
Maybe not elegant, but it seems to work. I attach the modified indicator which uses this piece of code.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; }
Comment
-
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
-
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?
Comment
-
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
-
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
-
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 PostWe 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
-
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
-
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 argusthome, 03-08-2026, 10:06 AM
|
0 responses
85 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
47 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
29 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
32 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
67 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment