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 CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      252 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      161 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      165 views
      1 like
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      251 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      203 views
      0 likes
      Last Post CarlTrading  
      Working...
      X