feat: Phase 3 — indicateurs techniques calibrés par horizon option
- technical_indicators.py (nouveau) : compute_indicators() calcule RSI, MA fast/slow, Bollinger Bands, ATR — périodes calibrées automatiquement selon horizon_days - config.py : endpoints GET/PUT /config/tech-indicators (activé, liste, auto-calibration) - useApi.ts : useTechIndicatorsConfig + useSaveTechIndicatorsConfig hooks - Config.tsx : carte "Indicateurs techniques" dans Options—Paramètres avec toggles - auto_cycle.py : compute top-5 tickers à chaque cycle si tech_indicators_enabled=true - ai_analyzer.py : tech_indicators_block injecté dans suggestion + scoring prompts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -491,6 +491,25 @@ export const useSaveOptionsGate = () => {
|
||||
})
|
||||
}
|
||||
|
||||
export const useTechIndicatorsConfig = () =>
|
||||
useQuery({
|
||||
queryKey: ['tech-indicators-config'],
|
||||
queryFn: () => api.get('/config/tech-indicators').then(r => r.data),
|
||||
staleTime: 60_000,
|
||||
})
|
||||
|
||||
export const useSaveTechIndicatorsConfig = () => {
|
||||
const qc = useQueryClient()
|
||||
return useMutation({
|
||||
mutationFn: (body: {
|
||||
tech_indicators_enabled?: boolean
|
||||
tech_indicators_list?: string
|
||||
tech_indicators_auto_calibrate?: boolean
|
||||
}) => api.put('/config/tech-indicators', body).then(r => r.data),
|
||||
onSuccess: () => qc.invalidateQueries({ queryKey: ['tech-indicators-config'] }),
|
||||
})
|
||||
}
|
||||
|
||||
export const useSimPortfolioRisk = () =>
|
||||
useQuery({
|
||||
queryKey: ['journal-portfolio-risk'],
|
||||
|
||||
Reference in New Issue
Block a user