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 Hwop38, 05-04-2026, 07:02 PM
      0 responses
      152 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      305 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      244 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      345 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      176 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X