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 cmoran13, 04-16-2026, 01:02 PM
|
0 responses
43 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
26 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|
||
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
163 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
98 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
158 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|

Comment