trtr

Trading simulator and techanalysis gym
git clone https://git.ea.contact/trtr
Log | Files | Refs | README

commit fc2f8e5ebd51094e4bea55c0b892cee019513b13
parent 7042fe83c9192f8e84b888be7704c4f80c0ea874
Author: ea <ea@ea.contact>
Date:   Fri, 29 May 2026 10:30:11 +0000

rm Simulator

Diffstat:
Mfrontend/index.html | 59+++++++----------------------------------------------------
1 file changed, 7 insertions(+), 52 deletions(-)

diff --git a/frontend/index.html b/frontend/index.html @@ -413,22 +413,7 @@ /* ── Gym Mode ────────────────────────────────────────────────────────── */ - #gym-mode-btn { - background: #1a1a3a; - color: #7070a0; - border: 1px solid #3a3a6a; - border-radius: 6px; - padding: 6px 14px; - font-size: 0.8rem; - cursor: pointer; - transition: background 0.15s, color 0.15s; - } - #gym-mode-btn:hover { background: #28285a; color: #c0c0e0; } - #gym-mode-btn.gym-active { - background: #28105a; - color: #b090ff; - border-color: #6040b0; - } + #gym-canvas { position: absolute; @@ -440,7 +425,7 @@ } #gym-sidebar { - display: none; + display: flex; width: 220px; flex-shrink: 0; background: #16162a; @@ -575,7 +560,6 @@ <option value="11">Nov</option> <option value="12">Dec</option> </select> - <button id="gym-mode-btn">Techalyzis Gym</button> <button id="new-session-btn">New Session</button> </div> </header> @@ -588,7 +572,7 @@ <div id="loading-overlay">Loading data&hellip;</div> </div> - <div class="sidebar" id="sim-sidebar"> + <div class="sidebar" id="sim-sidebar" style="display:none"> <div class="portfolio"> <h2>Portfolio</h2> <div class="stat"> @@ -709,7 +693,7 @@ <button id="auto-play-btn" disabled title="Auto-play (~8 candles/sec)">&#9654;</button> <span class="key-hint">&nbsp;</span> </div> - <div class="footer-btn-group" id="ff-btn-group" style="display:none"> + <div class="footer-btn-group" id="ff-btn-group"> <button id="ff-to-position-btn" disabled>&#9654;&#9654; Play to close</button> <span class="key-hint">C</span> </div> @@ -1244,7 +1228,7 @@ // ── Gym Mode ────────────────────────────────────────────────────────────── - let gymMode = false; + let gymMode = true; let gymFastForwarding = false; let gymActiveTool = null; // null = no tool, chart pans/zooms freely const gymDrawings = []; @@ -1593,37 +1577,6 @@ tool ? hints[tool] : 'Select a tool or pan/zoom freely.'; } - function enterGymMode() { - gymMode = true; - document.getElementById('gym-mode-btn').textContent = '← Simulator'; - document.getElementById('gym-mode-btn').classList.add('gym-active'); - document.getElementById('sim-sidebar').style.display = 'none'; - document.getElementById('gym-sidebar').style.display = 'flex'; - document.getElementById('ff-btn-group').style.display = ''; - clearCurrentBreakEven(); - chart.timeScale().applyOptions({ rightOffset: GYM_RIGHT_OFFSET }); - resizeGymCanvas(); - setGymTool(null); // start with no tool so chart pans freely - updatePredictionInfo(); - updateGymScore(); - } - - function exitGymMode() { - gymMode = false; - document.getElementById('gym-mode-btn').textContent = 'Techalyzis Gym'; - document.getElementById('gym-mode-btn').classList.remove('gym-active'); - document.getElementById('sim-sidebar').style.display = 'flex'; - document.getElementById('gym-sidebar').style.display = 'none'; - document.getElementById('ff-btn-group').style.display = 'none'; - gymCanvas.style.pointerEvents = 'none'; - syncCurrentBreakEven(); - chart.timeScale().applyOptions({ rightOffset: 0 }); - } - - document.getElementById('gym-mode-btn').addEventListener('click', () => { - if (gymMode) exitGymMode(); else enterGymMode(); - }); - // Tool buttons — click active tool to deselect ['line', 'pencil', 'text', 'predict'].forEach(tool => { document.getElementById('tool-' + tool).addEventListener('click', () => { @@ -1729,7 +1682,9 @@ // ── Boot ────────────────────────────────────────────────────────────────── initChart(); + chart.timeScale().applyOptions({ rightOffset: GYM_RIGHT_OFFSET }); resizeGymCanvas(); + setGymTool(null); startSession(); </script> </body>