For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See:

Instant values of indicators solution

  • Re: Instant values of indicators

    I'm creating a live data feed and was looking to see if there's already a solution to instant indicator values.

    For example:
    Buy when: (1min_RSI < _buy_value) AND (30min_RSI < _buy_value)
    Sell when: (1min_RSI > _sell_value) AND (30min_RSI > _sell_value)
    self.datas[0] = 1min data, self.datas[1] = 30min data
    Polls every 5s for data, but only calls _load_bar() every 1min.

    When next() is called in strategy, the 30min_RSI will stay the same value for 30 minutes. Is there an easy way to get the 'current' 30min_RSI every minute?

    (Also, I tried the solution in the thread above but had no luck )

    One solution i see would be to copy the 30min indicator and simulate the next value every minute, but was just looking to see if a solution was already found.


  • I believe the solution was found long ago (actually implemented long ago). It's called *replay.

Log in to reply