NexusFi: Find Your Edge


Home Menu

 





force decimal price marker display different than ticksize


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one ceramictilepro with 3 posts (0 thanks)
    2. looks_two Fat Tails with 3 posts (3 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 forrestang with 1 posts (0 thanks)
    1. trending_up 3,481 views
    2. thumb_up 3 thanks given
    3. group 2 followers
    1. forum 8 posts
    2. attach_file 1 attachments




 
Search this Thread
  #1 (permalink)
 
mea109's Avatar
 mea109 
france
 
Experience: Beginner
Platform: nt
Posts: 198 since Oct 2009
Thanks Given: 1,776
Thanks Received: 56

Good evening,

On y axis, price markers of indicators are rounded automatically to the ticksize of instrument.

I'd like to get more decimals to show than what I have now.

Can I force more decimals for display on y axis to get more accurate information ? via NinjaScript coding


Attached Images
 
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Bond Market Rout -- Worst Week Since Russias 2022 Invasi …
Treasury Notes and Bonds
Irans Dual Probability: Guns Quiet at 99.95% While Forma …
Prediction Markets & Event Contracts
April CPI Preview: +3.7% YoY Expected at 8:30 AM ET -- C …
Traders Hideout
Probability Collapse: Bitcoin $150k Craters from 15% to …
Prediction Markets & Event Contracts
CFTC Launches Innovation Task Force for AI Trading Syste …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,114


This is possible by overriding FormatPriceMarker. Just add this to your indicator code:

 
Code
public override string FormatPriceMarker (double price)
{
              string priceMarker = "";
              .....   // calculate string from price here
              return priceMarker;
}


Reply With Quote
Thanked by:
  #4 (permalink)
 ceramictilepro 
Roseville CA
 
Experience: Advanced
Platform: N7
Broker: Amp Futures/CQG
Trading: ES
Posts: 124 since Jun 2009
Thanks Given: 32
Thanks Received: 21

is there code to set the price marker to false?

Thank You


Reply With Quote
  #5 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,114


ceramictilepro View Post
is there code to set the price marker to false?

Thank You

You could try something like this:

 
Code
public override string FormatPriceMarker(double price)
{
   string nothing = "";
   return nothing;
}


Or you can simply add one line in the Initialize Section of the indicator, such as

 
Code
PaintPriceMarkers = false;


Reply With Quote
Thanked by:
  #6 (permalink)
 
forrestang's Avatar
 forrestang 
Chicago IL
Legendary Urban Samurai
 
Experience: None
Platform: Ninja, MT4, Matlab
Broker: CQG, AMP, MB, DTN
Trading: E/U, G/U
Posts: 1,345 since Jun 2010
Thanks Given: 357
Thanks Received: 1,060

Speaking of initializing, is there a list somewhere of the common initialize statements one might use somewhere? Such as the CalculateonBarClose, overlay, MaximumBarsLookBack etc.....


Reply With Quote
  #7 (permalink)
 ceramictilepro 
Roseville CA
 
Experience: Advanced
Platform: N7
Broker: Amp Futures/CQG
Trading: ES
Posts: 124 since Jun 2009
Thanks Given: 32
Thanks Received: 21

I was close

PriceMarker = false;




Reply With Quote
  #8 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,114


ceramictilepro View Post
I was close

PriceMarker = false;




Is that what you state after you have missed your plane?


Reply With Quote
  #9 (permalink)
 ceramictilepro 
Roseville CA
 
Experience: Advanced
Platform: N7
Broker: Amp Futures/CQG
Trading: ES
Posts: 124 since Jun 2009
Thanks Given: 32
Thanks Received: 21

lol,

Thanks FatTails


Fat Tails View Post
Is that what you state after you have missed your plane?


Reply With Quote




Last Updated on September 26, 2011


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts