PDA

View Full Version : No Plots


SystemTrading
12-29-2008, 12:09 PM
I am using the following code to add a plot. The plot is set numerous times while the code is running, but I don't see anything on the chart. Am I missing something?

Initilize....


Add(new Plot(Color.Red,PlotStyle.Line,"Support"));
Add(new Plot(Color.Red,PlotStyle.Line,"Resistance"));



OnBarUpdate()....


Support.Set(myvalue);
Resistance.Set(myvalue);


Properties...


#region Properties

[Browsable(false)]
[XmlIgnore]
public DataSeries Support
{
get {return Values[0]; }
}

[Browsable(false)]
[XmlIgnore]
public DataSeries Resistance
{
get {return Values[1]; }
}

#endregion

NinjaTrader_Bertrand
12-29-2008, 12:24 PM
Hi SystemTrading, have you checked for any errors in the Log tab, mostly likely you ran into this - http://www.ninjatrader-support2.com/vb/showthread.php?t=3170

If not, is AutoScale set to false and you can't see the Support / Resistance levels displayed?

Did you use Print() inside your code to make sure the levels are calculated correctly and deliver values?

SystemTrading
12-29-2008, 12:32 PM
I did run into that issue as well, so I have added similar code to the link you posted. I have not looked at autoscaling so hopefully that's where my problem is, but shouldn't I still see the data in the data window if the plot is there?

SystemTrading
12-29-2008, 12:38 PM
AutoScaling is set to true and there is nothing in my error log. I am definately setting the values as using the print statements clearly returns properly formatted prices.

NinjaTrader_Bertrand
12-29-2008, 12:38 PM
Yes, you should see the values of your Plots in the Data window...so this would point to some miscalculation then inside the code.

NinjaTrader_Bertrand
12-29-2008, 12:56 PM
Of course you can always post the code if you wish, then we can take a look to help spotting the issue.