Sounds great ! Yes, Rocket is mind bending at first.
TBH it looks like an anti-pattern. The whole point is to separate data and concerns among actors for composition and reusability. In Rocket/Reactive, actors shouldn’t share states. It’s not a hard line but it can save you tons of trouble with async stuffs.
I see three possible concerns here:
- Building a sink DataFrame. (Some kind of blotter. See the keep() operator in Rocket)
- Making Decision. (A Strategy)
- Charting stuffs. (Some kind of blotter)
Sounds like a lot of waiting. Why not making things independent ?
- Have each indicator have its own life and fire data as it processes them.
- Have a strategy that keeps whatever data it needs and no more. Have it receive notification for quotes, indicators, positions, fills or whatever you want.
That’s how Rocket and Lucky are designed anyway.
Look at sync() operator in Rocket.