NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 04-09-2012, 09:26 AM   #1
I_Quant
Junior Member
 
Join Date: Feb 2012
Posts: 28
Thanks: 1
Thanked 2 times in 2 posts
Default Show Plot PriceMarker but not Plot line

Hi

Is there a way to show a Plot's PriceMarker but not show the Plot line.

thanks
I_Quant is offline  
Reply With Quote
Old 04-09-2012, 09:37 AM   #2
NinjaTrader_Matthew
NinjaTrader Customer Service
 
NinjaTrader_Matthew's Avatar
 
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,858
Thanks: 162
Thanked 579 times in 570 posts
Default

Hello,

You can set the Plot color to the same color as the background of the chart. This will hide the plot from the chart, but there should be the numeric value and outline of the price marker on the right panel.
NinjaTrader_Matthew is offline  
Reply With Quote
Old 04-09-2012, 10:18 AM   #3
I_Quant
Junior Member
 
Join Date: Feb 2012
Posts: 28
Thanks: 1
Thanked 2 times in 2 posts
Default

thx Mathew

yes that does as you say, thx for that.

however is it poss to get some color onto that marker ? perhaps by the FormatPriceMarker override ?
I_Quant is offline  
Reply With Quote
Old 04-10-2012, 01:23 AM   #4
I_Quant
Junior Member
 
Join Date: Feb 2012
Posts: 28
Thanks: 1
Thanked 2 times in 2 posts
Default

here is the answer for me.

use PlotStyle.Hash when adding the Plot

use the following two statements in the OnBarUpdate override.

Values[0].Set(yournumber);
Values[0].Set(1,0);

the second statement overwrites the prior bar plot value with a zero value, so you should see a horizontal line at the zero level.

you will get a single plot marker on the current bar at your level and you will still get a colored price marker (using the Hash style means that the markers are not connected to each other, so you get the single plot at your number while all the other plots become zero - if you use the Line style then you would get a vertical line from zero to your number on the current bar, as Ninja connects the zero to your number)

hope this helps someone
Last edited by I_Quant; 04-10-2012 at 02:22 AM.
I_Quant is offline  
Reply With Quote
The following user says thank you to I_Quant for this post:
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I cannot get this line plot and show in databox randomwalker General Programming 6 04-26-2012 08:28 AM
Need to be able to plot lines programmatically, have them show up in all timeframes DancesWithBears Indicator Development 1 03-18-2011 01:21 PM
Gaps in Line Plot netjms Indicator Development 1 08-14-2010 01:52 PM
Plot horizontal line ssg10 General Programming 1 05-13-2009 05:54 AM
Line Plot velocity General Programming 10 05-07-2009 05:59 AM


All times are GMT -6. The time now is 04:11 PM.