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

Plotting on RENKO Bars

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

    Plotting on RENKO Bars

    Hey guys, I'm trying to use conditional statements in my EMA indicator, and it works just fine on Time Based bars. I can plot EMAs and the conditions work just fine. But when I apply the indicator to Renko Bars or other Price Based bars, It never shows up.

    Is there a step that I'm missing when it comes to plotting in Renko bars. HERE's a Sample of my conditional statement. Before you reply, NOTe that I can plot the EMA in RENKO bars, when I remove my Conditional statment. But the whole point is I want the full conditions to be available on these Renko bars as well as time based bars.

    *My variables are Period1 and Period2
    *MY Plots are EMA1 and EMA2


    protected override void OnBarUpdate()
    {
    EMA1.Set(EMA(Input, Period1)[0]);
    EMA2.Set(EMA(Input, Period2)[0]);

    if (CrossBelow(Low, EMA(Period1), 1)
    && Close[5] >= EMA(Period2)[5] //This is the close of 5 bars ago
    && Close[4] >= EMA(Period2)[4] ) //This is the close of 4 bars ago
    {
    DrawTriangleUp("My triangle up" + CurrentBar, true, 0, Low[0] + -1 * TickSize, Color.Cyan);
    }
    }

    #2
    Hi Ginz10k,

    Thank you for your post.

    Do you receive any errors in the Log Tab of the Control Center after adding the indicator to the Renko Chart?

    Would you be willing to share the script by attaching your indicator to your reply so that I may test it on my side?
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Of Course

      The indicator is attached here. Try it on a time based bar, and watch it work fine. then apply to Renko and it doesn't work anymore.

      Thanks for assistance.
      Attached Files

      Comment


        #4
        Ginx10k,

        Thank you for your reply.

        I was not able to import the .ZIP folder as it contains duplicate methods inside. Ensure you are exporting the script from a clean Custom folder, meaning that there are no other custom DLLs in the folder.
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          That was my bad. The file included now should work. It's just the Indicator.cs and the @EMA.cs .
          Attached Files

          Comment


            #6
            Ginx10k,

            I tested out the indicator on a Renko chart and was able to get it to plot.

            Would you please send me a request at Support[at]ninjatrader[dot]com
            Put ATTN Cal in the subject and reference this thread in the body
            Cal H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by owensd, 04-21-2024, 11:34 PM
            9 responses
            34 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by trilliantrader, 04-10-2024, 09:33 PM
            7 responses
            25 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by traderqz, Today, 12:06 AM
            5 responses
            11 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by Mongo, Today, 11:05 AM
            2 responses
            10 views
            0 likes
            Last Post Mongo
            by Mongo
             
            Started by guillembm, Today, 11:25 AM
            0 responses
            5 views
            0 likes
            Last Post guillembm  
            Working...
            X