Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

rangebars

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

    rangebars

    Hi,
    I am trying to make the following indicator I have started it but I am not familar with NT script could it please be finished. All the logic is there.

    I am trying to achieve this 'Upbar' is simply defined as a bar where the open is in the lower 33% and the close is in the upper 33% of the candle. A downbar is the opposite of this.



    int RangePercent = 33;
    double range;
    protectedoverridevoid OnBarUpdate()
    {
    // Use this method for calculating your indicator values. Assign a value to each
    // plot below by replacing 'Close[0]' with your own formula.
    //Plot0.Set(Close[0]);
    if (RangePercent > 0)
    {
    double range = High[0]-Low[0];
    if (High[0]-Close[0] < range * RangePercent*100 && Open[0]-Low[0] < range * RangePercent*100)
    {

    Paint the bar blue
    elseif (Close[0] - Low[0] < Range*RangePercent/100 && High[0] - Open[0] < Range*RangePercent/100)
    {

    Paint the bar red
    }

    }
    }

    }

    thanks,
    Trader
    Last edited by traderandreas; 06-21-2008, 11:14 PM.

    #2
    To paint a bar a certain color use BarColor = Color.Red; or Color.Blue.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      range bars indicator

      Hi Every one,
      This is my first indicator and I would like to contribute this to this wonderfull community. Could you please check it and I hope that it is useful. Thanks Josh for the suggestion.
      thanks,
      Trader
      Attached Files

      Comment


        #4
        Thanks, please post in the file sharing section along with the specific criteria such as an export zip file, image of the indicator etc...
        RayNinjaTrader Customer Service

        Comment


          #5
          range bars indicator

          Hi,
          Here is the zipped file. I hope this of use to your trading.
          thanks,
          Trader
          Attached Files
          Last edited by traderandreas; 06-23-2008, 01:59 AM.

          Comment


            #6
            Thanks for your contribution. Could you please post in the file sharing section: http://www.ninjatrader-support.com/vb/local_links.php

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by bill2023, Yesterday, 08:51 AM
            8 responses
            43 views
            0 likes
            Last Post bill2023  
            Started by yertle, Today, 08:38 AM
            6 responses
            25 views
            0 likes
            Last Post ryjoga
            by ryjoga
             
            Started by algospoke, Yesterday, 06:40 PM
            2 responses
            24 views
            0 likes
            Last Post algospoke  
            Started by ghoul, Today, 06:02 PM
            3 responses
            16 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by jeronymite, 04-12-2024, 04:26 PM
            3 responses
            46 views
            0 likes
            Last Post jeronymite  
            Working...
            X