Skip to content

[BUG] Indicators cannot subscribe to data source that is already consumed. #419

@n1s

Description

@n1s

Bug report

I tried to add a few indicators that track premium across exchanges. It seems that if those indicators consume the same source data the second indicator will have not access to the subscribed market data (the data will be 0).

See screenshot.
Correct sources are added.

Checklist

  • I provided a clear and concise description of the bug (see both sections below).
  • I documented the issue with screenshots.
  • I have attached an [export of my Aggr database] the issue.
  • I checked my browser's console output for errors and included it in the issue if any.

Description of what the bug is

  • Environment: aggr.trade
  • Version: [v3.7.0]

Steps to reproduce:

Add two indicators as follows:

Indicator 1

var exchange = 'BINANCE'
var premium = source(close, exchange=exchange, type="perp") - source(close, exchange=exchange, type="spot")

line(premium, title='binance')

Indicator 2

var premium = source(close, exchange='BINANCE', type="perp") - source(close, exchange='COINBASE', type="spot")

line(premium, title='crossEx')

Indicator 1 will display data correctly.
Indicator 2 will have no data for binance perp so it will displays high negative number from coinbase only.

Screenshots

Image

Export Aggr Database

aggr-n1-premium-d9cg.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions