o Start Strategy Emergency Stop os botoes nao estao funcionando - Follow Up Deployment
Browse files- index.html +15 -2
index.html
CHANGED
|
@@ -159,8 +159,8 @@
|
|
| 159 |
</div>
|
| 160 |
|
| 161 |
<div class="grid grid-cols-2 gap-2 mt-6">
|
| 162 |
-
<button class="bg-green-700 hover:bg-green-600 py-2 rounded-md">Start Strategy</button>
|
| 163 |
-
<button class="bg-red-700 hover:bg-red-600 py-2 rounded-md">Emergency Stop</button>
|
| 164 |
</div>
|
| 165 |
</div>
|
| 166 |
|
|
@@ -304,6 +304,19 @@
|
|
| 304 |
}
|
| 305 |
});
|
| 306 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 307 |
// Simulate live data updates
|
| 308 |
setInterval(() => {
|
| 309 |
const newValue = data[data.length - 1] + (Math.random() - 0.5) * 0.001;
|
|
|
|
| 159 |
</div>
|
| 160 |
|
| 161 |
<div class="grid grid-cols-2 gap-2 mt-6">
|
| 162 |
+
<button id="startStrategy" class="bg-green-700 hover:bg-green-600 py-2 rounded-md">Start Strategy</button>
|
| 163 |
+
<button id="emergencyStop" class="bg-red-700 hover:bg-red-600 py-2 rounded-md">Emergency Stop</button>
|
| 164 |
</div>
|
| 165 |
</div>
|
| 166 |
|
|
|
|
| 304 |
}
|
| 305 |
});
|
| 306 |
|
| 307 |
+
// Button event handlers
|
| 308 |
+
document.getElementById('startStrategy').addEventListener('click', function() {
|
| 309 |
+
alert('Strategy started successfully!');
|
| 310 |
+
// Here you would add your actual strategy start logic
|
| 311 |
+
});
|
| 312 |
+
|
| 313 |
+
document.getElementById('emergencyStop').addEventListener('click', function() {
|
| 314 |
+
if (confirm('Are you sure you want to emergency stop the strategy?')) {
|
| 315 |
+
alert('Strategy stopped! All positions closed.');
|
| 316 |
+
// Here you would add your actual emergency stop logic
|
| 317 |
+
}
|
| 318 |
+
});
|
| 319 |
+
|
| 320 |
// Simulate live data updates
|
| 321 |
setInterval(() => {
|
| 322 |
const newValue = data[data.length - 1] + (Math.random() - 0.5) * 0.001;
|