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!
See more
See less

Partner 728x90

Collapse

Renko charts and overlaying indicators

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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!


    #2
    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.
    Attached Files
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      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


        #4
        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 elcowen, Today, 01:16 PM
        0 responses
        1 view
        0 likes
        Last Post elcowen
        by elcowen
         
        Started by snoinvest, Today, 11:44 AM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by Dan_TUK, Today, 11:16 AM
        3 responses
        13 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by DawnTreader, 05-08-2024, 05:58 PM
        56 responses
        326 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by dmisselhorn, 07-02-2024, 07:50 AM
        6 responses
        48 views
        0 likes
        Last Post w5l8nx1
        by w5l8nx1
         
        Working...
        X