Page 1 of 1

Historical listener with layer1 API

Posted: Tue Apr 06, 2021 8:03 am
by zcsoka
Greetings,

I am implementing a layer1 version2 API based indicator (no simplified) and I did not find a way to apply it to historical data. Although you have posted multiple examples of mixing the simplified and the low level API, it seems not to work in my code. Even if I implement the HistoricalDataListener, the plugin will not be calculated on the historical data (I mean the data since the start of Bookmap, not talking about the cloud data). Am I doing something wrong? Is there an example of historical indicators for  the non simplified interface? 

Many thanks in advance,

Kind Regards,

Zoltan

Re: Historical listener with layer1 API

Posted: Tue Apr 06, 2021 8:36 am
by Svyatoslav
Hi. Since you are using core L1 API, please clarify how are you accessing the history, since there are few ways of doing that. If you are using "Generators extension" (which is what simplified "HistoricalDataListener" uses under the hood) you just need to make sure that you set "shouldReceiveHistory" and "shouldReceiveBackfilledData" flags inside Layer1ApiUserMessageAddStrategyUpdateGenerator

Re: Historical listener with layer1 API

Posted: Wed Nov 02, 2022 5:20 pm
by rlojykishf
Hi, how can I use historical data loaded from cloud (Rithmic)? Now I can use only data since start of Bookmap and for SMA 144 (M1) I must wait 144 minutes to get correct MA on chart :(.

Re: Historical listener with layer1 API

Posted: Mon Nov 07, 2022 1:36 pm
by Andry API support
For Simplified API your module needs to implement the BackfilledDataListener interface. As soon as cloud data is loaded your module will be reloaded automatically. For Core API you need to wait for the message indicating the historical data is loaded and then recompute your generators.