Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

if(historical data is reloaded)

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

    if(historical data is reloaded)

    Hello,

    Is there a way to reference if(historical data is reloaded) by either clicking on the right click relaod all data or when NT8 does it automatically e.g when reconnecting to data source?

    If i can find a way of registering the reloaded event then I want to be abe to trigger an action before onbarupdate so what state would the action sit in for it to come after the reload trigger but before onbrupdate?

    Thanks

    #2
    Hello b16_aln,

    Thank you for the post.

    For the events you mentioned you wouldn't need to monitor for that, the script will just terminate and then reload like you just applied it for the first time. Any logic that needs to run before OnBarUpdate could be placed in State.DataLoaded or as the first logic for CurrentBar 0:

    Code:
    if(CurrentBar == 0)
    { 
        // run logic once
    }
    I look forward to being of further assistance.

    Comment


      #3
      Thanks but this doe snot produce the required effect. I was hoping to be able to diffrenetiate and set different actions for restarting the code and specifically when a data reload occurs (i.e when a data reload is the cause of restarting the code, do different action.

      Comment


        #4
        Hello b16_aln,

        To your script it would be unable to differentiate these actions, It also really should not perform differently for those two cases anyway as the reload is the same in the eyes of the script. In both cases the script needs to totally restart because of the change of data or manual reload request. it will start from the beginning and process the bars again.

        If you can provide more specific details on why you need to differentiate here potentially there is a different way to accomplish that task.


        Please let me know if I may be of additional assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        650 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        370 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        109 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        574 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        577 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X