I’m developing a custom indicator that uses the Goertzel transform to extract dominant cycles from recent price data. These cycles are then used in a genetic algorithm to optimize amplitudes and reconstruct the signal with the most relevant components.
This logic is implemented inside the map(d, i, history) function.
I’ve observed that price and volume updates can trigger multiple executions of map() within the same forming bar, at a frequency higher than the chart’s selected timeframe. This is expected — and even desirable — for live reactivity, but raises a technical concern:
If my indicator is in the middle of a long computation and a new intra-bar update occurs, it seems that the ongoing map() execution is silently interrupted and a new one starts from scratch. No queuing, no completion, just dropped work.
To clarify:
I’m already using d.isComplete() and this.lastIndex to avoid redundant or unnecessary recalculations.
What I’m looking for is not a way to skip future updates, but a way to ensure that a map() already in progress is allowed to run to completion.
Is there any setting or design pattern in Tradovate that ensures a map() execution completes before another begins?
Or alternatively:
Is it confirmed that map() is interruptible and that partial executions can be discarded without finishing?
This behavior has important implications in cases like mine, where computationally expensive logic (e.g. signal reconstruction with optimized cycles) is sensitive to incomplete state or wasted cycles.
Thanks in advance for any insights or official clarification.
Sounds very interesting. I have no experience with indicators in Tradovate.
Have you considered doing it on a nodejs servers instead with real-time data? You will be in full control of the calculations and you could even have it take trades automatically.
Is there any setting or design pattern in Tradovate that ensures a map() execution completes before another begins?
Hmm, I have not noticed this behavior, and by definition, a map must process the entire list of data (and should not return early) and “map” the new result.
How are you determining the map is not fully complete?
I’m developing a custom indicator that uses the Goertzel transform to extract dominant cycles from recent price data. These cycles are then used in a genetic algorithm to optimize amplitudes and reconstruct the signal with the most relevant components.
I was curious what indicator you were looking to build, are any of these what you’re looking for?