Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

UpdateBar NT7 convert to UpdateBar NT8

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

    UpdateBar NT7 convert to UpdateBar NT8

    NT7 UpdateBar has open, high, low, close but NT8 UpdateBar has only high, low , close how to convert?

    ---NT7 code
    ......
    Data.Bar bar = (Bar)bars.Get(bars.Count - 1);

    UpdateBar(bars, bar.Open, (close > bar.High ? close : bar.High), (close < bar.Low ? close : bar.Low), close, time, volume, isRealtime);
    ......

    --NT8 code

    .................
    UpdateBar(bars,
    // bars.GetOpen(bars.Count - 1), //no Open in NT8 ??????????
    (close > bars.GetHigh(bars.Count - 1) ? close : bars.GetHigh(bars.Count - 1)), (close < bars.GetLow(bars.Count - 1) ? close : bars.GetLow(bars.Count - 1)), close,time, volume);
    .....

    How to convert? since Open is missing in NT8?
    Attached Files
    Last edited by nkhoi; 12-29-2017, 01:05 AM.

    #2
    Hello,

    Thank you for the post.

    I will need to get further clarification on this to understand why this may have been removed. It does appear that all of the standard bar types have been modified to omit the open where UpdateBar is used. If you are creating a type that is similar to one of the existing bar type, you could use the included bars types as a reference point while developing. Once I have further information on this item, I will reply back here.

    I look forward to being of further assistance.

    Comment


      #3
      Hello,

      After further clarification, In this case, to adjust open you need to RemoveLastBar then AddBar to modify the open price and set IsRemoveLastBarSupported bar bool to true.

      I look forward to being of further assistance.

      Comment


        #4
        Originally posted by nkhoi View Post
        NT7 UpdateBar has open, high, low, close but NT8 UpdateBar has only high, low , close how to convert?

        ---NT7 code
        ......
        Data.Bar bar = (Bar)bars.Get(bars.Count - 1);

        UpdateBar(bars, bar.Open, (close > bar.High ? close : bar.High), (close < bar.Low ? close : bar.Low), close, time, volume, isRealtime);
        ......

        --NT8 code

        .................
        UpdateBar(bars,
        // bars.GetOpen(bars.Count - 1), //no Open in NT8 ??????????
        (close > bars.GetHigh(bars.Count - 1) ? close : bars.GetHigh(bars.Count - 1)), (close < bars.GetLow(bars.Count - 1) ? close : bars.GetLow(bars.Count - 1)), close,time, volume);
        .....

        How to convert? since Open is missing in NT8?
        Even though the bar open field is visible in NT7, it is not adjustable and cannot be updated.
        The NT8 version does not have this field which is more correct because it is not update-able. The only way to change it is by the method described in prior post.
        RJay
        NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        606 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        353 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        560 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        561 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X