Is there something I need to do so that the values for the EMA correspond directly to the Renko chart values. And if I write an indicator or strategy with Ninjascript to track both data sets, is that possible? If there's any example code, that would be awesome!
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
Renko charts and overlaying indicators
Collapse
X
-
Renko charts and overlaying indicators
I've just gotten into looking at Renko charts and I am fascinated. I know that when it comes to Renko charts you should combine that information with information derived from indicators. So I created a Renko chart and then created an EMA over that data. I was very excited initially until I noticed some odd behavior. That is the EMA doesn't necessarily correspond with the Renko data. In particular, if you move the chart left or right, the EMA line changes vertically, such that where it might not intersect the Renko chart in one location, you can shift the chart such that the EMA does intersect. Looking at the data box is even more confusing such that the EMA value where it intersects the Renko chart is no where close to the high/low of the Renko chart. I've tried locking the axes but that doesn't help.
Is there something I need to do so that the values for the EMA correspond directly to the Renko chart values. And if I write an indicator or strategy with Ninjascript to track both data sets, is that possible? If there's any example code, that would be awesome!
Tags: None
-
Hello dweems,
Thanks for your post.
An EMA indicator will not necessarily line up within the Renko bar. The EMA indicator could be above or below the bar depending on the values calculated based on the EMA period and data from the Renko bar.
See the attached screenshot.
EMA: https://ninjatrader.com/support/help...onential_e.htm
Renko Bar Type: https://ninjatrader.com/support/help...ndingRenkoBars
To see how the EMA indicator calculates values, open a New > NinjaScript Editor window, open the Indicators folder, and double-click on the EMA file.
Please let me know if I may assist further.Brandon H.NinjaTrader Customer Service
-
I did some more experimenting and found a solution. I created another frame with standard time-based candlestick data. Then I created the EMA on that data, and then dragged the EMA line into the frame with the Renko chart. Now the data is not shifting with respect to each other and is more of what I want since the Renko chart is a finer resolution wrt price. The only thing I would have loved would be to be able to see the EMA values for each brick position of the Renko but since it was created with the standard time-based data, I only get changes where the two intersect. But that still has some merit.
Do you have any example code where you are using the data coming from a Renko data series?
Comment
-
Hello dweems,
Thanks for your note.
The solution you mention means that the EMA is calculated using a time-based bar object and not the Renko bar. You are then applying the EMA calculated from time-based data on the Renko bar chart.
If you want the EMA to calculate from the Renko bar brick, you would need to have the EMA calculate based on the Renko bar, not the added time-based bar. There are no options for having the EMA calculate using both the time-based bar and Renko bar.
For example, you could add the EMA indicator to the Renko bar chart and the EMA will calculate based on the Renko bar data.
If you are doing this through code and plotting the EMA in your script, you would add your custom script to the Renko bar chart to have it use that primary series Renko data for the EMA's calculations.
AddPlot() would be used to create a plot, then you would assign the EMA() value to the plot and apply this script to a Renko bar chart.
AddPlot(): https://ninjatrader.com/support/help...t8/addplot.htm
EMA(): https://ninjatrader.com/support/help...onential_e.htm
Let me know if I may asssit further.Last edited by NinjaTrader_BrandonH; 02-13-2023, 02:36 PM.Brandon H.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by KingCandy, Today, 06:31 PM
|
0 responses
10 views
0 likes
|
Last Post
![]()
by KingCandy
Today, 06:31 PM
|
||
Started by xmess777, Today, 05:32 PM
|
0 responses
5 views
0 likes
|
Last Post
![]()
by xmess777
Today, 05:32 PM
|
||
Started by peterpanou, 09-07-2023, 04:33 PM
|
16 responses
169 views
0 likes
|
Last Post
![]()
by max333
Today, 05:15 PM
|
||
Started by HalTech, Today, 04:35 PM
|
0 responses
13 views
0 likes
|
Last Post
![]()
by HalTech
Today, 04:35 PM
|
||
Started by IndyScalper, Today, 03:59 PM
|
0 responses
14 views
0 likes
|
Last Post
![]()
by IndyScalper
Today, 03:59 PM
|
Comment