Structured guide for implementing and verifying financial technical indicators and trading signals with accuracy and performance.
Ensure all technical analysis indicators (MA, EMA, RSI, KD, etc.) and trading signals are mathematically accurate, performant, and consistent with industrial standards.
You must have:
Before integrating into the UI, you MUST:
Ask explicitly:
“Have we verified the calculation logic against a trusted baseline for this indicator?”
For data-intensive calculations:
When defining signals (Buy/Sell/Hold):
Triggered: The exact moment the condition is met.In-Progress: The condition is still true after being triggered.Cooling: Prevention of rapid re-triggering (debounce).Implement the pure mathematical function.
function calculateSMA(data: number[], period: number): number[] { ... }
Test with dummy data.
Bind to the chart or signal list.
Check precision (floating point issues) and UI lag.
Refuse to proceed if: