NexusFi: Find Your Edge


Home Menu

 





Formatting the Y-Axis


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 5 posts (4 thanks)
    2. looks_two timmyb with 4 posts (2 thanks)
    3. looks_3 cory with 1 posts (2 thanks)
    4. looks_4 Mindset with 1 posts (0 thanks)
    1. trending_up 8,965 views
    2. thumb_up 8 thanks given
    3. group 5 followers
    1. forum 12 posts
    2. attach_file 4 attachments




 
Search this Thread

Formatting the Y-Axis

  #11 (permalink)
 
Trader.Jon's Avatar
 Trader.Jon 
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
Posts: 473 since Jul 2009
Thanks Given: 401
Thanks Received: 184


Fat Tails View Post
In manual mode you can fix the upper and lower margin, but I did not see any option to format the numbers.

.

Fat Tails,

What you are doing is currently well beyond my own contribution/knowledge, and I might be totally confused on your project, but I have a hunch some of this might be useful to you:
How do you convert Price to Y axis values? - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

TJ

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
MC PL editor upgrade
MultiCharts
Exit Strategy
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Diary of a simple price action trader
31 thanks
My NQ Trading Journal
21 thanks
Just another trading journal: PA, Wyckoff & Trends
17 thanks
Tao te Trade: way of the WLD
14 thanks
HumbleTraders next chapter
9 thanks
  #12 (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,102

Have just corrected the code from post # 10. As I cannot change it anymore, here is the new version. The prior version had a small bug, so may be one of the moderators can replace it with this one.

 
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;
}

Started this thread Reply With Quote
  #13 (permalink)
 
Mindset's Avatar
 Mindset 
Singapore
 
Experience: Intermediate
Platform: NT
Broker: ib
Trading: MES
Posts: 365 since Sep 2009
Thanks Given: 90
Thanks Received: 291



cory View Post
I just throw this one in here, maybe it helps or not.

I am a little confused by this indicator - it doesn't seem to do anything other than a fixed scale or am I missing something

Reply With Quote




Last Updated on January 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