NexusFi: Find Your Edge


Home Menu

 





force decimal price marker display different than ticksize


Discussion in NinjaTrader

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




 
Search this Thread

force decimal price marker display different than ticksize

  #1 (permalink)
 
mea109's Avatar
 mea109 
france
 
Experience: Beginner
Platform: nt
Posts: 201 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?
ZombieSqueeze
Platforms and Indicators
Trade idea based off three indicators.
Traders Hideout
Quant vue
Trading Reviews and Vendors
Cheap historycal L1 data for stocks
Stocks and ETFs
MC PL editor upgrade
MultiCharts
 
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


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, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


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
 
Experience: None
Platform: Ninja, MT4, Matlab
Broker: CQG, AMP, MB, DTN
Trading: E/U, G/U
Posts: 1,329 since Jun 2010
Thanks Given: 354
Thanks Received: 1,047

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, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


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


© 2024 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 - Privacy Policy - Downloads - Top
no new posts