I need to implement a fully repainting indicator in Tradovate that, at each new live bar (incomplete), performs:
- An FFT on the N most recent bars before the live one
- Applies a frequency cutoff filter
- Performs an IFFT (inverse transform)
- And displays all N reconstructed values on the N bars preceding the current one
In other words:
- I need to fully repaint the signal on N bars every time a new live bar arrives.
- This is an intentional design: I recalculate and rewrite past values on every update.
Why this is NOT like the official FourierMovingAverage example
In the official tutorial here Fourier Moving Average | Tradovate Custom Indicators
- The indicator computes a new FFT for each historical bar, one by one.
- It only outputs the current filtered value (re[0]) for the bar being evaluated.
- As a result, it does not repaint past values after new bars arrive — it computes the past values once during loading.
In contrast, my approach is different:
I compute the FFT only at runtime on the latest N bars, and then redistribute the entire IFFT result back over those same N historical bars — repainting them on every new bar.
The problem
I tried to implement this logic, and logs confirm that:
- FFT and IFFT are correctly executed on each new live bar
- An array of
N
filtered values is available after the inverse transform - I attempt to return these values by associating them to indexes
index - N + 1
throughindex
Yet — nothing appears on the chart.
so, the question is:
- Is it possible in the Tradovate custom indicator system to repaint past bars dynamically (e.g., on every live bar, rewrite the values on the last N historical bars)?
- Are there any known working examples that do this?
- Is it necessary to use
graphics
instead ofplots
to force this kind of dynamic retroactive rendering?
I would really appreciate guidance or confirmation if this approach is viable or fundamentally unsupported.
Thanks in advance!
— Federico