Order Flow Analytics Platform (Conceptual Simulator)
Input Mock Order Flow Data
Order Flow Metrics
Process data in Tab 1 to view metrics.
Cumulative Delta Chart (Conceptual)
Chart will appear after processing data.
Volume Profile & Price Level Analysis
Shows total volume traded at each price level based on input data, split by bid/ask aggressor volume.
Volume Profile chart will appear after processing data.
Conceptual Interpretation & Insights
Interpretations based on the processed mock data will appear here.
No data processed. Input data in Tab 1 and click "Process Data".
'; chartContainer.innerHTML = 'Chart will appear after processing data.
'; return; } const res = ofap_analysisResults; let totalAskVolume = 0, totalBidVolume = 0; res.volumeProfile.forEach(vp => { totalAskVolume += vp.askVolume; totalBidVolume += vp.bidVolume; }); container.innerHTML = `| Metric | Value |
|---|---|
| Asset Analyzed | ${ofap_config.assetName} |
| Total Trades Processed | ${ofap_flowEvents.length} |
| Total Volume Traded | ${totalAskVolume + totalBidVolume} |
| Total Volume on Ask (Agg. Buys) | ${totalAskVolume} |
| Total Volume on Bid (Agg. Sells) | ${totalBidVolume} |
| Overall Net Delta | ${res.overallDelta > 0 ? '+' : ''}${res.overallDelta} |
| Final Cumulative Delta | ${res.cumulativeDeltaPoints[res.cumulativeDeltaPoints.length-1].y > 0 ? '+' : ''}${res.cumulativeDeltaPoints[res.cumulativeDeltaPoints.length-1].y} |
No data processed. Input data in Tab 1.
'; keyLevelsContainer.innerHTML = ''; return; } const vpData = ofap_analysisResults.volumeProfile; // Assumed sorted by price desc const maxTotalVolumeAtPrice = Math.max(...vpData.map(p => p.totalVolume), 0); chartContainer.innerHTML = ''; // Clear previous const precision = ofap_config.tickSizePrecision(); vpData.forEach(level => { const bidWidthPercent = maxTotalVolumeAtPrice > 0 ? (level.bidVolume / maxTotalVolumeAtPrice) * 100 : 0; const askWidthPercent = maxTotalVolumeAtPrice > 0 ? (level.askVolume / maxTotalVolumeAtPrice) * 100 : 0; const barDiv = document.createElement('div'); barDiv.className = 'ofap_vp_bar_container'; let isPoc = ofap_analysisResults.poc && ofap_analysisResults.poc.price === level.price; // To make bid volumes appear on left and ask on right relative to a "center" (not implemented here, just stacked L-R) // A more traditional VP would draw from center, or bids left, asks right aligned to price. // This is simplified: bids first, then asks, inside a wrapper. barDiv.innerHTML = ` ${level.price.toFixed(precision)}Key Volume Profile Levels:
`; if (ofap_analysisResults.poc) { keyLevelsContainer.innerHTML += `Point of Control (POC): ${ofap_analysisResults.poc.price.toFixed(precision)} (Volume: ${ofap_analysisResults.poc.totalVolume})
`; } if (ofap_analysisResults.hvn.length > 0) { keyLevelsContainer.innerHTML += `High Volume Node(s) (examples): ${ofap_analysisResults.hvn.slice(0,3).map(n=>n.price.toFixed(precision)).join(', ')}
`; } } function ofap_displayInterpretations() { const container = ofap_getEl('ofap_interpretationText'); if (!container) return; if (!ofap_analysisResults || ofap_analysisResults.interpretations.length === 0) { container.innerHTML = 'No data processed or specific interpretations generated. Process data in Tab 1.
'; return; } container.innerHTML = '- ' + ofap_analysisResults.interpretations.map(interp => `
- ${interp} `).join('') + '