Set SMA Weight
0x484428507A212cA56D71baa27Ca6089a6dB63a88

What this does

This plug resolves the token at a caller-supplied index and writes its computed SMA weight target into the socket's weights map at that slot. It asks the caller for an index naming the token slot and an sma_window setting the moving-average window length. It fires whenever run, composing the Get Weight Target plug to derive the weight from the token read at that index. Setting the weight by hand or from a stale window risks storing a target that no longer reflects the token's current moving average.

Actions · 3

  • Read map value
    Read map value of in in
    Reads a value from a keyed map in the socket's persistent storage.
  • Use
    Use where
    tokenis
    windowis
    Composes another plug inside this one.
  • Set map value
    Set map value of in in to
    Writes a value into a keyed map in the socket's persistent storage.

Related plugs · 8