Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to get indicator historical values in the another indicator?

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

    How to get indicator historical values in the another indicator?

    How to get indicator historical values in the another indicator?

    Indicator used 1 tick data.

    So I try to get data:

    private Smeter smeter;
    ...
    else if (State == State.Configure)
    {
    AddDataSeries(Data.BarsPeriodType.Tick , 1);
    }
    else if (State == State.DataLoaded)
    {
    smeter = Smeter(....);
    }

    OnBarUpdate:

    double x = smeter.AvgVall[0];

    Print(x);

    It working only realtime.
    On history I get zeros only, but indicator correctly drawing.
    What I doing wrong?
    Last edited by SergeRosenberg; 06-08-2022, 01:36 AM.

    #2
    Hello SergeRosenberg,

    Thank you for your note.

    I'd really need to see the indicator called from a working example script to be able to definitively say why it's not working in real time as some indicators would either require the use of tick replay on a chart to work historically or are simply programmed to only process in real time. If you turn Tick Replay on on the chart, does the indicator calculate as you'd expect?

    Thanks in advance; I look forward to assisting further.

    Comment


      #3
      Hi Kate,
      I turned Tick Replay On and indicator begin working on history.
      Thanks a lot for help!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      562 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      325 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
      547 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X