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 Multi-Time Frame CCI

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

    Renko Multi-Time Frame CCI

    I am trying to draw a CCI from a higher time frame (8renko on my 4renko chart) but all it does is print bars every now and then, I assume when a new bar is created on the 8 renko chart. How do I make it so that the 4 renko chart "fills in" or shows whatever value the 8 renko bar is during that whole period so there are no gaps?

    Code:
    protected override void OnBarUpdate()
            {        
                
                if (BarsInProgress == 1)
                {
                    if (CCI(BarsArray[1],input1)[0]>100)
                    {    
                            BarUp.Set(CCI(BarsArray[1],input1)[0]);        
                    }
                    else if (CCI(BarsArray[1],input1)[0]<-10)
                    {
                        BarDown.Set(CCI(BarsArray[1],input1)[0]);
                    }
                    else
                    {
                        BarMiddle.Set(CCI(BarsArray[1],input1)[0]);
                    }
                }
            }
    When I try some other things I've seen in various other answers I get an indicator that shows nothing:

    protected override void OnBarUpdate()
    Code:
       {        
                if (CurrentBars[0] <= input1 || CurrentBars[1] <= input1 || BarsInProgress != 0)
                return;
                if (BarsInProgress == 1)
                {
                    if (CCI(BarsArray[1],input1)[0]>100)
                    {    
                            BarUp.Set(CCI(BarsArray[1],input1)[0]);        
                    }
                    else if (CCI(BarsArray[1],input1)[0]<-10)
                    {
                        BarDown.Set(CCI(BarsArray[1],input1)[0]);
                    }
                    else
                    {
                        BarMiddle.Set(CCI(BarsArray[1],input1)[0]);
                    }
                }
            }
    If I use BarsInProgress == 0 in either configuration, it doesn't work at all either.
    Attached Files
    Last edited by jmflukeiii; 04-14-2012, 04:38 PM.

    #2
    Solved that problem... have another

    So I figured out what I was doing wrong and that's fixed, but I have another question. I am trying to plot multiple histograms on the same chart of different instruments, is there a way of doing this so that they can all be seen, i.e. adjust the output values of the 3 instruments I'll be plotting so that Indi1 ranges between -20 and 20, Indi2 between -10 and 10, Indi3 between -1 and 1

    and assign different thicknesses to them all so that Indi1 is 3 thick, Indi2 is 2 thick and Indi1 is 1 thick

    and then adjust importance so the the thinnest indi is always plotted on top of the others so Indi1 is plotted in the first foreground, Indi2 is plotted behind it and Indi3 is plotted behind both?

    Hopefully this makes sense.... here's a picture of what it is now with just two indi's
    Attached Files

    Comment


      #3
      jmflukeiii,

      Yes, this is definitely possible.

      Are you running into any issues trying to do this?
      Adam P.NinjaTrader Customer Service

      Comment


        #4
        Yes they all print on the same "plain", if you will, meaning that whatever is the thickest shows on top of the others. How can I arrange it so the thinner ones will print in front of the thicker ones?

        Thank you

        Comment


          #5
          jmflukeiii,

          You can click any plot, hold shift then scroll the mouse wheel. This will layer it the way you want.

          Programmatically, you can use the following forum to learn how to do something like this : http://www.bigmiketrading.com/ninjat...35-zorder.html

          However, please note its unsupported.
          Adam P.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Shansen, 08-30-2019, 10:18 PM
          24 responses
          939 views
          0 likes
          Last Post spwizard  
          Started by Max238, Today, 01:28 AM
          0 responses
          7 views
          0 likes
          Last Post Max238
          by Max238
           
          Started by rocketman7, Today, 01:00 AM
          0 responses
          4 views
          0 likes
          Last Post rocketman7  
          Started by wzgy0920, 04-20-2024, 06:09 PM
          2 responses
          28 views
          0 likes
          Last Post wzgy0920  
          Started by wzgy0920, 02-22-2024, 01:11 AM
          5 responses
          33 views
          0 likes
          Last Post wzgy0920  
          Working...
          X