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

Range bar close price

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

    Range bar close price

    Im trying to program an indicator that displays the current range bar anticipated close price. lets say new range bar just started and its up bar now i want to see what would be the price it would close at. e.g range bar opened at 90.00 and its a .09 range bar chart, the indicator should display a value as 90.09. as range bar forms, the close should dynamically change as close price could change depending on range bar movement.

    i only care the current bar value and want to display the value right below current bar. below is what i came up with and its not working. I'm new to programming, can some one please help, please....

    Thanks
    Chak.

    protected override void Initialize()
    {
    Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
    ChartOnly = true;
    Overlay = true;
    CalculateOnBarClose = false;
    }

    /// <summary>
    /// Called on each bar update event (incoming tick)
    /// </summary>
    protected override void OnBarUpdate()
    {
    // Use this method for calculating your indicator values. Assign a value to each
    // plot below by replacing 'Close[0]' with your own formula.
    Value.Set((RangeCounter(true)[0] + Last[0]));
    }

    #2
    chakriare, there are already a few versions of this indicator available on the forum. The first one I could find was developed by eDanny, and can be found on his website. It is called RangeBarTargets and I've attached it for your convenience.
    Attached Files
    AustinNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by wzgy0920, Yesterday, 09:53 PM
    1 response
    13 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by Rapine Heihei, Yesterday, 07:51 PM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by kaywai, Today, 06:26 AM
    1 response
    6 views
    0 likes
    Last Post kaywai
    by kaywai
     
    Started by ct, 05-07-2023, 12:31 PM
    6 responses
    206 views
    0 likes
    Last Post wisconsinpat  
    Started by kevinenergy, 02-17-2023, 12:42 PM
    118 responses
    2,780 views
    1 like
    Last Post kevinenergy  
    Working...
    X