Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How do I use AddHeikenAshi
Collapse
X
-
How do I use AddHeikenAshi
In my indicator I want to have some calculation based on HeikenAshi OHLC candles, so for this I include AddHeikenAshi() in ''else if (State == State.Configure)'' but I do not know how to fill the parameters of AddHeikenAshi(). I want the same instruments and the same timeframe as whatever the timeframe and instrument my indicator is applied to. So for instance if I apply my indicator to a chart of ES with 30min candles, I want the HeikenAshi OHLC candles for ES on the 30min chart. How do I do this ?Tags: None
-
Hello alanlopen,
You can see an example of using AddHeikenAshi at the bottom of its help guide page:
This method does not have a way to inherit the primary instrument so you would need to type in the instrument like shown in the sample.
Timeframes cannot be automatically assumed by any of the add data methods so that is something you also need to specify when adding it.
-
Hello alanlopen,
To do that you would need to AddHeikenAshi so the script always adds that data. You can then make a enum property that is used from OnBarUpdate to determine which indicator value to use.
The AddDataSeries/AddHeikenAshi methods are not dynamic and cannot use variables so if you plan to use secondary data based on a user selection you still have to always add that secondary data and then make the choice of what series is used in your OnBarUpdate logic.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
571 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
330 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
548 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
549 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment