Ninja B
07-25-2008, 06:53 AM
I'm trying to get the displaced EMA and SMA to use in a strategy. Plot a couple of bars ahead and behind using displacement. I write the code fine in the strategy wizard and then go in manually and enter this
// Initialize method of a custom indicator
protected override void Initialize()
{
Add(new Plot(Color.Orange, "SMA"));
Displacement = 2; // Plots the indicator value from 2 bars ago on the current bar
}
http://www.ninjatrader-support.com/HelpGuideV6/helpguide.html?HistoricalData
I get the following: The name 'Displacement' does not exist in current context
:confused:
// Initialize method of a custom indicator
protected override void Initialize()
{
Add(new Plot(Color.Orange, "SMA"));
Displacement = 2; // Plots the indicator value from 2 bars ago on the current bar
}
http://www.ninjatrader-support.com/HelpGuideV6/helpguide.html?HistoricalData
I get the following: The name 'Displacement' does not exist in current context
:confused: