Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
HeikenAshiBarsType calculatet based on UniRenkoBarsType
Collapse
X
-
HeikenAshiBarsType calculatet based on UniRenkoBarsType
Hi, I would like to use the UniRenkoBarsType as a price basis for the calculation of the HeikenAshi bars, unfortunately these are not listed in the selection. I suspect that a new *BarsTypes.cs has to be created. Unfortunately, I have no idea how to proceed. Is there perhaps a template or even a ready-made BarsType.cs? In the NinjatraderEcosystem I only found the HeikenAshi8 indicator, but since this is an indicator, and I like to have everything as a unique barstype, this does not help me.
Tags: None
-
Hello sidlercom80,
Thanks for your post.
The reason for the Heiken-Ashi indicator is to be able to use it on exotic bar types.
I suspect you may not understand how to use the indicator.
The indicator will provide 4 values that you can use in your programming.
HAClose
HAOpen
HAHigh
HALow
Those are the names of the plots and you can access any or all four the same as if you were using standard bar data.
For example: if (HAClose[0] > HAOpen[0]) { // do something }
For input to an indicator, you can use it like this SMA(HAclose, 20)[0]; // 20 period SMA based on the Heiken - ashi close price.
To further assist I've created an example strategy that creates a private instance of the Heiken-Ashi indicator and an EMA indicator. This provides you with a specific example of how to use the indicator in both the bar data and as an input to an indicator. When applied to a chart of unirenko bars they then are the input to the Heiken-ashi indicator, thus meeting the need you specified of Unirenko input to Heiken-ashi.
Here is a screenshot of the example strategy:
Here is a basic guideline of how to import NinjaScript add-ons in NinjaTrader 8:
Note — To import NinjaScripts you will need the original .zip file.
To Import:- Download the NinjaScripts to your desktop, keep them in the compressed .zip file.
- From the Control Center window select the menu Tools > Import > NinjaScript Add-on...
- Select the downloaded .zip file
- NinjaTrader will then confirm if the import has been successful.
Critical - Specifically for some NinjaScripts, it will prompt that you are running newer versions of @SMA, @EMA, etc. and ask if you want to replace, press 'No'
HeikenAshiExample.zip
Last edited by NinjaTrader_PaulH; 08-17-2021, 11:57 AM.
- Likes 1
-
Hi _PaulH, thank you very much for your answer, that helped me very well.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
597 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
343 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 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
556 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
555 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment