![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Apr 2008
Posts: 99
Thanks: 0
Thanked 0 times in 0 posts
|
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/H...HistoricalData I get the following: The name 'Displacement' does not exist in current context ![]() |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Displacement exists on indicators but not on strategies.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Apr 2008
Posts: 99
Thanks: 0
Thanked 0 times in 0 posts
|
|
|
|
|
|
|
#4 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
That should work
Dierk
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Indicator Displacement | FatCanary | Charting | 2 | 06-15-2008 05:31 PM |
| Displacement Issue | PrTester | Indicator Development | 1 | 08-17-2007 10:52 PM |
| Kentler Swing using displacement field in strategy | richa61416 | Strategy Development | 3 | 07-04-2007 04:02 PM |
| Not able to access WoodiesCCI ; The name WoodiesCCI does not exist in the current context | Obi | Strategy Development | 4 | 03-27-2007 08:22 AM |
| strategy id ' ' does not exist | highflyer | Automated Trading | 4 | 12-08-2005 04:43 AM |