Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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.Paul H.NinjaTrader Customer Service
- 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 judysamnt7, 03-13-2023, 09:11 AM
|
4 responses
59 views
0 likes
|
Last Post
by DynamicTest
Today, 08:25 PM
|
||
Started by ScottWalsh, Today, 06:52 PM
|
4 responses
36 views
0 likes
|
Last Post
by ScottWalsh
Today, 07:40 PM
|
||
Started by olisav57, Today, 07:39 PM
|
0 responses
7 views
0 likes
|
Last Post
by olisav57
Today, 07:39 PM
|
||
Started by trilliantrader, Today, 03:01 PM
|
2 responses
21 views
0 likes
|
Last Post
by helpwanted
Today, 07:25 PM
|
||
Started by cre8able, Today, 07:24 PM
|
0 responses
10 views
0 likes
|
Last Post
by cre8able
Today, 07:24 PM
|
Comment