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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        81 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        42 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        64 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        68 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        55 views
        0 likes
        Last Post CarlTrading  
        Working...
        X