Announcement

Collapse
No announcement yet.

Use Settlement As Close On Daily Interval Checkbox Using Wrong Close Value

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Use Settlement As Close On Daily Interval Checkbox Using Wrong Close Value

    There looks to be a bug with the Use Settlement as Close on daily interval (USCDI) checkbox (Edit Chart -> USCDI)

    With USCDI ON, the previous daily close should be the close of the previous days 16:15 candle.
    With USCDI OFF, the previous daily close should be the close of the previous days 16:59 candle.

    The bug occurs when the study is left on overnight and then calculates the previous daily close the next day, it seems the USCDI checkbox thinks it is OFF, while it is still ON.

    For example, on 2020-4-28 we turn our study on at 9:30am, it calculates the previous daily close using the statement below with USCDI ON. The previous daily close returns the correct value from 2020-4-27 16:15 candle. Then we let the script run overnight. At 2020-4-29 9:30am, the previous daily close is calculated again with USCDI still ON. However, the previous daily close returns the incorrect value from 2020-4-28 16:59 candle instead of the 16:15 candle.

    A restart of eSignal fixes this issue for the current day but then occurs again when left on overnight.

    We calculate the previous daily close like this:
    PHP Code:
    var g_close getSeries(close(sym(getSymbol() + ",D"))).getValue(-1); 
Working...
X