Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Auto-extend chart plots of the last quote given of symbols with no real-time data

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

    Auto-extend chart plots of the last quote given of symbols with no real-time data

    Hello

    When I plot symbols with EOD data like for example the QQQ, as the normal they only load data until the previous market close, and what I need is a way to “auto-extend” the plot of the last quote that a symbol with no real-time data showed in the chart, in order to have that last price level extended to the current chart time, and in this way those symbols are shown aligned with the rest of symbols that do have real-time data. And for example in the cases of weekends where all the markets are closed I think this just could simply show a 0-extension, when no needed like these special cases.


    I need this in 2 scenarios:

    #1. In a simple way in a chart as a standard plot directly from the Data Series. Ideally just going to Data Series, choosing the extra symbol needed with EOD data and then the way to auto-extend the plot.

    #2. The second scenario is to have a way to do this into a script that creates something like “custom” plots. Of course, this unless NT8 has a kind of built-in way to extend the plots for the point #1 here, because if NT8 has that kind of easy built-in feature to do this then maybe this 2nd process wouldn’t be necessary. You would let me know. But if no, then maybe this point could be done with a code portion I could add to ‘Values[0][0]’ at the moment to work the plot part in the script, or any suggestion you could provide. For this point #2, maybe you could have a script example that shows how to work this what I need.


    I attached 2 pictures to visually see a kind of example about the result I’m looking for.

    Thank you!

    Click image for larger version

Name:	NT8. A way to auto-extend and complete symbols last quote with no real-time data. Illustration 1.png
Views:	385
Size:	78.9 KB
ID:	1178014
    Click image for larger version

Name:	NT8. A way to auto-extend and complete symbols last quote with no real-time data. Illustration 2.png
Views:	346
Size:	84.3 KB
ID:	1178015

    #2
    Hi futurenow, thanks for posting.

    It looks like you have a mutli time frame script with a 5 minute primary series and a daily secondary series. In this case, you would need to plot the daily data during the primary series OnBarUpdate e.g.

    if(BarsInProgress == 0 && CurrentBars[1] > 1)
    {
    ThePlot[0] = DailyData[0]; // this will ensure there is a plot value for every bar on the chart.
    }

    Best regards,
    -ChrisL

    Comment


      #3
      Thank you for your reply Chris

      Ok, maybe I didn’t describe in deep more situations where this is needed. The attached picture is just a simplified example of what I need.

      I’m working with 1 or more primary static instruments with real-time data in the chart as base, and additionally also with multiple secondary instruments that are changed dynamically in a manual way, and many of the secondary instruments have EOD data or delayed data. So yes, your solution would be valid when the EOD/Delayed data is static (fixed/non-movable in the chart) and only with one EOD/Delayed instrument that can be put as the main, but this is not the case I have. And what I need is if the script detect a specific EOD/Delayed instrument is not in present time in the chart, then to extend the plot with a horizontal line to get aligned to the present time in the chart, in a similar way as the second attached picture with a line with the same color of the instrument plot.

      I want to know and visually notice that these EOD/Delayed instrument are in fact in a past time, For what I need actually I don’t see useful that the past data plots just be moved to a present time in a no real situation, but instead of that what it would be useful in this cases is a kind of condition where if an instrument is 30 min delayed or previous-market-close delayed etc., then being able to see where is located that delay (where is its last “bar”) because seeing where was the last “zig-zag” in the line-on-close plot, and after that time level just extend the price level with a horizontal line to be adjusted to the present chart time, and doing this either if the secondary instruments are a different time-frames than the main instruments or in the same time-frame.

      In this case the idea would be when the script detects a delayed plot just auto-extend it and done, independently of the delay situation.


      Just to clarify, these EOD/Delayed instruments are actually plotted in line-on-close chart style, e.g. ‘FourthInstrument = Closes[4][0]’, and that’s why I’m talking about to extend with a horizontal line, although on second thought it would be still valid also for bars/candles, just extending/drawing the exact horizontal line based in the bar close at the delay moment.


      Thank you very much for your time

      Comment


        #4
        Hi futurenow, thanks for your reply.

        If you are not getting real-time updates for the second series then there will be no OnBarUpdate call for that series. The script would need to compare the updates it is getting in the primary series to the last time stamp found on the secondary series and extend the value by either plotting on the primary series or using Draw.Line() to draw a line from the last data point to the end of the chart. OnRender can also be used for this. You will need to test out the data you are getting by printing values and timestamps from both BarsInProgress == 0 and BarsInProgress == 1 to see the behavior of this real time/delayed data mix.

        Best regards,
        -ChrisL

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        571 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        330 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        548 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        549 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X