lagging indicator values at day start

bhasin888
if i want to have a lagging indicator like a 20 period SMA on 5 min candles, do i need a historical api data as during the start of the day, it would require yesteday's candle to calculate the SMA.
i know candle data is to be created by the user, i just want to know if live market data includes some data from yesterdayso that i can calculate the SMA during market start.
  • syker
    You need historical api data for calculating the SMA at the start of day. Or you can save the candle data in a file and use it for calculating SMA, and keep repeating saving the candle data.
Sign In or Register to comment.