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 AaronKoRn, Today, 09:49 PM
    0 responses
    7 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Today, 08:42 PM
    0 responses
    9 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Today, 07:51 PM
    0 responses
    10 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,980 views
    3 likes
    Last Post jhudas88  
    Started by rbeckmann05, Today, 06:48 PM
    0 responses
    9 views
    0 likes
    Last Post rbeckmann05  
    Working...
    X