Announcement

Collapse
No announcement yet.

Spreads and efs

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spreads and efs

    Having a problem with efs updating on spreads. If I chart a symbol ES #F with the kama from http://share.esignal.com/groupconten...s&groupid=114, there is no differnece between the lines when updated in realtime and when reloaded. However, if I chart a spread, e.g ES #F - NQ #F, the MA line will be different, when reloaded. Is there some way on BARSTATE_NEWBAR, I can modify the output from the prior bar, because if I could do that, I could just, in effect "reload" the last value for the prior bar.

    Thanks.

    atlas

  • #2
    Actually you can see it even with the built-in studies. Drop a moving average of, say, period 3 and exponential, on a spread. Take a screenshot. Remove the study, readd it. Compare the screen captures and there will be a few subtle and a few not-so subtle differences between the two.

    Comment


    • #3
      Hello atlas,

      This change in the historical indicator values is caused by the underlying data calculated for the spread. In real time the spread and subsequent bars are built using the real time data on a trade-by-trade basis. Historical bars on intra-day intervals are built from completed bar data using 1-minute history bars. The timing of the 1-min bars OHLC values between the two components may not have occurred at the same time stamps as what would have been calculated during each bar in real time. But they will be within 1-min of each other. This is as accurate as we can get for spreads at this time. The historical results will not match real time results exactly.

      There isn't a simple coding work-around for this issue. If you're comfortable with writing the data out to a text file using the File Object, you could write a routine that looks for a local file during reload to repopulate the plotted data by parsing the previously stored data that was collected during real time processing before the reload.
      Jason K.
      Project Manager
      eSignal - an Interactive Data company

      EFS KnowledgeBase
      JavaScript for EFS Video Series
      EFS Beginner Tutorial Series
      EFS Glossary
      Custom EFS Development Policy

      New User Orientation

      Comment

      Working...
      X