0) Quick Onboarding
The recommended reading order is simple: pick a ticker, confirm timeframe and period, inspect the chart overlays, read the probability card, validate the buy zone and stop loss, then review backtest and warnings before acting.
The page is designed as a single-stock execution console: chart on the left, decision cards on the right, and explanation plus diagnostics below.
The main score is not a generic bullish percentage. It is the model’s TP-first historical outcome rate for similar setups.
1) What The Page Does
chart-analysis.html is where InvestFlow turns a scanner idea into a concrete single-symbol decision frame. The page tries to answer five questions at once: what is the trend structure, what does the historical setup engine say, where is the disciplined entry band, where should the trade be invalidated, and what warnings reduce confidence?
Best use case
Use it after Analysis 1, Analysis 2, or a watchlist has already narrowed down the symbol universe.
Primary output
The page is optimized for timing and risk framing, not just raw prediction.
Decision style
The built-in decision layer resolves to practical states like BUY NOW, WATCH, WAIT FOR ENTRY, and CHASING RISK.
2) Header, Search, Favorite Symbols, Timeframe, Period
| Element | Role | Logic note |
|---|---|---|
| Header symbol strip | Shows current symbol, displayed price, and change. | Updated by updatePageHeader(). |
| Search box | Accepts ticker input. | The symbol is normalized to uppercase before fetch. |
| Favorite button | Saves or removes a tracked symbol. | Uses local storage key trading-guide-favorite-tickers. |
| Favorite chips | Fast jump back to tracked symbols. | The page also stores the add price. |
| 1d / 60m / 5m | Timeframe control. | Sent to API as tf. |
| 6m / 1y / 3y / 5y | History depth control. | Sent to API as period. |
| Analyze | Triggers the page pipeline. | The request is built in fetchTradingGuide(). |
3) Multi-Model Ranking Strip
The strip above the main dashboard connects this symbol back to Analysis 1 and Analysis 2 ranking logic. It asks whether the symbol also scores well in scanner models like Alpha Discovery, Breakout Radar, Stable Trend Picks, True Relative Value, or Hedge Fund Style.
4) Main Chart Anatomy
The main chart is rendered by renderMainChart(). Candles show price, the lower histogram shows volume, the green band shows the buy zone, and dashed horizontal lines show TP1, TP2, and stop loss.
5) Indicator Glossary
| Indicator | Visible now? | Meaning on this page |
|---|---|---|
| EMA20 | Yes | Fast trend guide for short swing direction. |
| EMA50 | Yes | Intermediate trend anchor and fallback buy-zone trend filter. |
| EMA200 | Yes | Long trend anchor. EMA50 above EMA200 suggests healthier structure. |
| VWAP | Yes | Institutional average price anchor. The fallback buy zone is built around VWAP. |
| Bollinger Bands | Yes, optional | Volatility envelope for squeeze, expansion, and stretch analysis. |
| RSI14 | Yes | Momentum oscillator. 70 is heat, 30 is washout or oversold stress. |
| ATR14 | Used in logic | Helps define fallback buy-zone width and risk spacing. |
| MACD / ADX / Stoch RSI / OBV / MFI14 | Prepared in data | Normalized by the page even if not all are surfaced as visible toggles right now. |
EMA calculation
The user-adjustable EMA overlays are recalculated locally by calculateEma(), so changing EMA A, B, or C updates the visual guide immediately.
Bollinger calculation
The page recalculates bands locally by calculateBollinger() using the selected length and standard deviation multiplier.
6) Probability & Signal Logic
The Probability & Signal card is the main model-interpretation panel. Its headline number is TP-first probability, not a vague “bullish percent.” It measures how often similar setups historically hit take profit before stop loss.
| Field | Meaning | How to read it |
|---|---|---|
| analysis.p_up | Adjusted TP-first probability. | Main model output for upside resolution before downside invalidation. |
| analysis.p_down | Adjusted downside complement. | Model-side opposite resolution risk. |
| probability.p_up_raw | Raw probability. | Useful for transparency before smoothing or adjustment. |
| Resolved / Candidates | Historical evidence count. | Higher sample count usually improves confidence in the signal class. |
| Timeouts / Ambiguous | Unresolved or noisy outcomes. | High values mean the setup class may be less clean than the main score suggests. |
| Confidence label | Human-readable confidence descriptor. | Useful shorthand, but secondary to evidence depth and warnings. |
7) Quick Decision Logic
The Quick Decision card is created by updateQuickDecisionCard(). It is deterministic logic built from entry-zone location, probability quality, current price, and signal text.
| Decision | Rule | Interpretation |
|---|---|---|
| BUY NOW | Price is inside the buy zone and probability is good, or signal includes BUY. | Conditions are aligned enough for an active entry. |
| WAIT | Probability is weak or signal includes AVOID. | The model is actively discouraging entry quality. |
| WAIT FOR ENTRY | Price is still below the buy zone. | The idea may be valid, but entry has not come into the intended band. |
| CHASING RISK | Price is above the buy zone. | Extension is too high relative to the planned risk box. |
| WATCH | Default fallback state. | Nothing is decisively broken, but alignment is incomplete. |
8) Technical Snapshot: Buy Zone, TP1, TP2, Stop Loss, Risk / Reward
The Technical Snapshot turns model output into execution structure. If the API already provides a buy zone, that zone is used. If not, the page computes a fallback with deriveFallbackBuyZone().
Fallback buy zone recipe
Anchor at VWAP, scale width with ATR14, check whether EMA50 >= EMA200, and use RSI neutrality to tighten or widen the band.
Why it exists
When API-side entry levels are missing, the page still gives a structured entry framework instead of leaving the user with empty values.
| Field | Source | Meaning |
|---|---|---|
| BUY ZONE | analysis.buyZone or fallback | Preferred controlled entry band. |
| TP1 | analysis.targets.tp1 | First upside objective. |
| TP2 | analysis.targets.tp2 | Second extended objective. |
| STOP LOSS | analysis.stopLoss | Invalidation line. |
| RISK / REWARD | analysis.riskReward | Payoff asymmetry near the intended entry range. |
9) Backtest Performance
This card frames the probability engine with strategy behavior. A good TP-first score is stronger when Sharpe, drawdown, sample size, and average R also look healthy.
| Metric | Meaning | Practical reading |
|---|---|---|
| Sharpe Ratio | Return efficiency relative to volatility. | Very high values can be good, but extremely high values may also hint at overfit. |
| Max Drawdown | Worst peak-to-trough historical loss path. | Deep drawdown lowers real-world usability. |
| Total Return | Aggregate backtest result. | Best read alongside drawdown and sample size. |
| Win Rate | Share of winning outcomes. | Useful, but must be paired with RR. |
| Samples | Historical evidence count. | Small sample size weakens confidence. |
| Average R | Average reward-to-risk style return unit. | More useful than raw return alone for trade systems. |
10) Analysis Summary, Drivers, Risk Warnings, Data Status
Analysis Summary
If model explanation bullets are missing, buildExplanation() creates fallback bullets from regime, EMA structure, buy-zone logic, and probability context.
Signal Drivers
renderDrivers() displays factor bars so the user can see whether strength is broad or concentrated in only one factor.
Risk Warnings
renderWarnings() adds warnings for low sample size, deep drawdown, and suspiciously high Sharpe values, on top of API warnings.
Data & Status
This block explains freshness, cache status, candidate window, engine name, horizon, and TP / SL ATR multiples.
11) Drawing Tools, Screenshot, Save PNG, Chart Only, Landscape
| Tool | Function | Storage or effect |
|---|---|---|
| Cursor | Select and manage drawings. | Saved per symbol, timeframe, and period with a storage key like trading-guide-drawings:{symbol}:{tf}:{period}. |
| Trend Line | Draw diagonal trend structure. | |
| Price Line | Draw horizontal support or resistance levels. | |
| Rectangle | Mark zones such as bases or supply / demand regions. | |
| Text | Add notes directly on the chart. | |
| Undo / Redo / Clear | Manage drawing history. | Uses local undo and redo stacks. |
| Chart Only / Landscape | Expand chart reading space. | Changes visual mode only. |
| Screenshot / Save PNG | Export chart image. | Built from the main chart and RSI chart in buildChartExportBlob(). |
12) Code And Data Flow
This is the main execution chain behind the page.
13) FAQ For SEO, GEO, And LLM Discovery
It means the historical probability that similar setups reached take profit before stop loss. It is not a guaranteed prediction and should be read with sample count, risk warnings, and entry location.
The page derives a fallback buy zone from VWAP, ATR, EMA50, EMA200, and RSI conditions so the user still gets a disciplined entry band.
EMA20, EMA50, EMA200, VWAP, Bollinger Bands, and RSI are the main visible interpretation tools. ATR is especially important in the underlying zone logic.
It is mainly a timing and risk-framing page. Long-term investors can still use it to improve entries, but the structure is optimized for execution discipline.
Disclaimer
This manual and the Chart Analysis page are for research and education only. They are not personalized financial advice and should be used together with independent judgment and position sizing discipline.