View Full Version : Display Line Value in Price Scale
jjthetrader
06-17-2009, 07:05 AM
Hello, I'd like to get the two lines I have plotted in this pic to show their value in the sprice scale just like the moving averages in the same pic.
Is there a way to do this. I'm using DrawLine to plot them, is this compatable with displaying it's value?
Thanks so much!
NinjaTrader_Josh
06-17-2009, 08:13 AM
If you want it on the right hand side you will have to make plots for them instead of using draw methods.
jjthetrader
06-17-2009, 08:32 AM
If you want it on the right hand side you will have to make plots for them instead of using draw methods.
Ok great, I've got them as plots now. How can I get it to display on the right now?
NinjaTrader_Josh
06-17-2009, 08:38 AM
If it is a plot, just set the value you want to the plot and the price markers will automatically show up. If you have disabled the price markers please ensure they are enabled for the indicator.
jjthetrader
06-17-2009, 09:03 AM
If it is a plot, just set the value you want to the plot and the price markers will automatically show up. If you have disabled the price markers please ensure they are enabled for the indicator.
Ok thanks, is there any way to do this with SetTrendLine as well?
NinjaTrader_Josh
06-17-2009, 09:06 AM
Not sure what you are referring to, but anything you want to have a price marker for needs to be done as a plot.
jjthetrader
06-17-2009, 09:21 AM
Not sure what you are referring to, but anything you want to have a price marker for needs to be done as a plot.
Ok thanks, now that it's set to plot, how do I get the old plots to delete and only keep the current ones?
Thanks.
NinjaTrader_Josh
06-17-2009, 09:28 AM
jjthetrader,
Just remove them from the Initialize() method and all other locations they are referenced in your code.
jjthetrader
06-17-2009, 09:41 AM
jjthetrader,
Just remove them from the Initialize() method and all other locations they are referenced in your code.
Hi, as seen in my pic I have all these old plot levels that stay even though we move onto a new level. I'd like to delete the old plots. Is this what you were refering to when you said remove them from the initialize() section?
Or do I need to add deleteplot or something?
Thank you
NinjaTrader_Josh
06-17-2009, 09:46 AM
No. Those values will stay. That is what is meant by using a plot. If you change the value it will change it from there on out, not the past. Trying to change the plot values of prior bars means you would have to cycle through the whole data set and reset the values for each one. Extremely inefficient and I do not recommend this.
jjthetrader
06-17-2009, 09:56 AM
No. Those values will stay. That is what is meant by using a plot. If you change the value it will change it from there on out, not the past. Trying to change the plot values of prior bars means you would have to cycle through the whole data set and reset the values for each one. Extremely inefficient and I do not recommend this.
Ok, thanks, back to DrawLine for me. Can I print the value in text beside a line?