Spaces:
Running
Running
Add 3 files
Browse files- README.md +7 -5
- index.html +594 -19
- prompts.txt +0 -0
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: stock-record-v1
|
| 3 |
+
emoji: ⚛️
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: gray
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- QwenSite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,594 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Stock Analysis Record Application</title>
|
| 7 |
+
<!-- SheetJS CDN for Excel import/export -->
|
| 8 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js"></script>
|
| 9 |
+
<style>
|
| 10 |
+
:root {
|
| 11 |
+
--primary: #007bff;
|
| 12 |
+
--primary-dark: #0056b3;
|
| 13 |
+
--success: #28a745;
|
| 14 |
+
--danger: #dc3545;
|
| 15 |
+
--warning: #ffc107;
|
| 16 |
+
--light: #f8f9fa;
|
| 17 |
+
--dark: #343a40;
|
| 18 |
+
--gray: #6c757d;
|
| 19 |
+
--border: #dee2e6;
|
| 20 |
+
}
|
| 21 |
+
body {
|
| 22 |
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
| 23 |
+
margin: 0;
|
| 24 |
+
padding: 0;
|
| 25 |
+
background-color: #f8f9fa;
|
| 26 |
+
color: #212529;
|
| 27 |
+
line-height: 1.5;
|
| 28 |
+
}
|
| 29 |
+
h1 {
|
| 30 |
+
text-align: center;
|
| 31 |
+
padding: 20px;
|
| 32 |
+
margin: 0;
|
| 33 |
+
background-color: var(--primary);
|
| 34 |
+
color: white;
|
| 35 |
+
font-size: 1.5rem;
|
| 36 |
+
}
|
| 37 |
+
.container {
|
| 38 |
+
max-width: 1200px;
|
| 39 |
+
margin: 0 auto;
|
| 40 |
+
padding: 15px;
|
| 41 |
+
}
|
| 42 |
+
.tab {
|
| 43 |
+
display: flex;
|
| 44 |
+
overflow-x: auto;
|
| 45 |
+
background-color: white;
|
| 46 |
+
border-bottom: 1px solid var(--border);
|
| 47 |
+
margin-bottom: 20px;
|
| 48 |
+
-webkit-overflow-scrolling: touch;
|
| 49 |
+
}
|
| 50 |
+
.tab button {
|
| 51 |
+
flex: 1;
|
| 52 |
+
min-width: 150px;
|
| 53 |
+
background-color: transparent;
|
| 54 |
+
border: none;
|
| 55 |
+
outline: none;
|
| 56 |
+
cursor: pointer;
|
| 57 |
+
padding: 14px 16px;
|
| 58 |
+
font-size: 1rem;
|
| 59 |
+
transition: background-color 0.3s;
|
| 60 |
+
}
|
| 61 |
+
.tab button:hover {
|
| 62 |
+
background-color: #e9ecef;
|
| 63 |
+
}
|
| 64 |
+
.tab button.active {
|
| 65 |
+
background-color: var(--primary);
|
| 66 |
+
color: white;
|
| 67 |
+
}
|
| 68 |
+
.tabcontent {
|
| 69 |
+
display: none;
|
| 70 |
+
background-color: white;
|
| 71 |
+
padding: 20px;
|
| 72 |
+
border-radius: 8px;
|
| 73 |
+
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
| 74 |
+
}
|
| 75 |
+
form label {
|
| 76 |
+
display: block;
|
| 77 |
+
margin: 10px 0 5px;
|
| 78 |
+
font-weight: 600;
|
| 79 |
+
}
|
| 80 |
+
input[type="text"], input[type="date"], input[type="number"], input[type="file"], textarea, select {
|
| 81 |
+
width: 100%;
|
| 82 |
+
padding: 10px;
|
| 83 |
+
border: 1px solid var(--border);
|
| 84 |
+
border-radius: 4px;
|
| 85 |
+
box-sizing: border-box;
|
| 86 |
+
font-size: 1rem;
|
| 87 |
+
}
|
| 88 |
+
textarea {
|
| 89 |
+
resize: vertical;
|
| 90 |
+
min-height: 120px;
|
| 91 |
+
}
|
| 92 |
+
#symbol {
|
| 93 |
+
position: relative;
|
| 94 |
+
}
|
| 95 |
+
button[type="submit"], button[type="button"] {
|
| 96 |
+
background-color: var(--success);
|
| 97 |
+
color: white;
|
| 98 |
+
padding: 12px 20px;
|
| 99 |
+
border: none;
|
| 100 |
+
border-radius: 4px;
|
| 101 |
+
cursor: pointer;
|
| 102 |
+
font-size: 1rem;
|
| 103 |
+
margin-top: 10px;
|
| 104 |
+
}
|
| 105 |
+
button[type="submit"]:hover, button[type="button"]:hover {
|
| 106 |
+
background-color: #218838;
|
| 107 |
+
}
|
| 108 |
+
button.cancel {
|
| 109 |
+
background-color: var(--gray);
|
| 110 |
+
}
|
| 111 |
+
button.cancel:hover {
|
| 112 |
+
background-color: #5a6268;
|
| 113 |
+
}
|
| 114 |
+
button.edit-btn {
|
| 115 |
+
background-color: var(--primary);
|
| 116 |
+
}
|
| 117 |
+
button.edit-btn:hover {
|
| 118 |
+
background-color: var(--primary-dark);
|
| 119 |
+
}
|
| 120 |
+
button.delete-btn {
|
| 121 |
+
background-color: var(--danger);
|
| 122 |
+
}
|
| 123 |
+
button.delete-btn:hover {
|
| 124 |
+
background-color: #c82333;
|
| 125 |
+
}
|
| 126 |
+
button.export-btn {
|
| 127 |
+
background-color: var(--warning);
|
| 128 |
+
color: var(--dark);
|
| 129 |
+
}
|
| 130 |
+
button.export-btn:hover {
|
| 131 |
+
background-color: #e0a800;
|
| 132 |
+
}
|
| 133 |
+
.actions {
|
| 134 |
+
display: flex;
|
| 135 |
+
gap: 10px;
|
| 136 |
+
flex-wrap: wrap;
|
| 137 |
+
}
|
| 138 |
+
.actions button {
|
| 139 |
+
flex: 1;
|
| 140 |
+
min-width: 80px;
|
| 141 |
+
padding: 8px;
|
| 142 |
+
font-size: 0.9rem;
|
| 143 |
+
}
|
| 144 |
+
#filterForm {
|
| 145 |
+
display: grid;
|
| 146 |
+
grid-template-columns: 1fr 1fr auto auto;
|
| 147 |
+
gap: 10px;
|
| 148 |
+
align-items: end;
|
| 149 |
+
margin-bottom: 20px;
|
| 150 |
+
}
|
| 151 |
+
#filterForm select, #filterForm input {
|
| 152 |
+
margin: 0;
|
| 153 |
+
}
|
| 154 |
+
.import-export {
|
| 155 |
+
display: flex;
|
| 156 |
+
flex-wrap: wrap;
|
| 157 |
+
gap: 10px;
|
| 158 |
+
margin-bottom: 20px;
|
| 159 |
+
align-items: center;
|
| 160 |
+
}
|
| 161 |
+
table {
|
| 162 |
+
width: 100%;
|
| 163 |
+
border-collapse: collapse;
|
| 164 |
+
}
|
| 165 |
+
th {
|
| 166 |
+
background-color: var(--primary);
|
| 167 |
+
color: white;
|
| 168 |
+
text-align: left;
|
| 169 |
+
padding: 12px;
|
| 170 |
+
font-size: 0.95rem;
|
| 171 |
+
}
|
| 172 |
+
td {
|
| 173 |
+
padding: 12px;
|
| 174 |
+
border-bottom: 1px solid var(--border);
|
| 175 |
+
vertical-align: top;
|
| 176 |
+
}
|
| 177 |
+
tr:nth-child(even) {
|
| 178 |
+
background-color: #f2f2f2;
|
| 179 |
+
}
|
| 180 |
+
.comment-field {
|
| 181 |
+
font-style: italic;
|
| 182 |
+
color: #555;
|
| 183 |
+
white-space: pre-wrap;
|
| 184 |
+
background-color: #f9f9f9;
|
| 185 |
+
padding: 10px;
|
| 186 |
+
border-radius: 4px;
|
| 187 |
+
border-left: 4px solid var(--gray);
|
| 188 |
+
}
|
| 189 |
+
.tenets-section {
|
| 190 |
+
margin-top: 30px;
|
| 191 |
+
padding: 20px;
|
| 192 |
+
background-color: #e9f7ef;
|
| 193 |
+
border-radius: 8px;
|
| 194 |
+
border-left: 5px solid var(--success);
|
| 195 |
+
}
|
| 196 |
+
.tenets-section h3 {
|
| 197 |
+
margin-top: 0;
|
| 198 |
+
}
|
| 199 |
+
.tenets-section ul {
|
| 200 |
+
padding-left: 20px;
|
| 201 |
+
}
|
| 202 |
+
.tenets-section li {
|
| 203 |
+
margin-bottom: 10px;
|
| 204 |
+
}
|
| 205 |
+
@media (max-width: 768px) {
|
| 206 |
+
h1 {
|
| 207 |
+
font-size: 1.3rem;
|
| 208 |
+
}
|
| 209 |
+
.tab button {
|
| 210 |
+
font-size: 0.9rem;
|
| 211 |
+
padding: 12px 10px;
|
| 212 |
+
}
|
| 213 |
+
#filterForm {
|
| 214 |
+
grid-template-columns: 1fr;
|
| 215 |
+
}
|
| 216 |
+
table, thead, tbody, th, td, tr {
|
| 217 |
+
display: block;
|
| 218 |
+
}
|
| 219 |
+
thead tr {
|
| 220 |
+
position: absolute;
|
| 221 |
+
top: -9999px;
|
| 222 |
+
left: -9999px;
|
| 223 |
+
}
|
| 224 |
+
tr {
|
| 225 |
+
border: 1px solid var(--border);
|
| 226 |
+
border-radius: 8px;
|
| 227 |
+
margin-bottom: 15px;
|
| 228 |
+
background-color: white;
|
| 229 |
+
box-shadow: 0 2px 5px rgba(0,0,0,0.05);
|
| 230 |
+
}
|
| 231 |
+
td {
|
| 232 |
+
border: none;
|
| 233 |
+
position: relative;
|
| 234 |
+
padding-left: 50%;
|
| 235 |
+
}
|
| 236 |
+
td:before {
|
| 237 |
+
content: attr(data-label);
|
| 238 |
+
position: absolute;
|
| 239 |
+
left: 12px;
|
| 240 |
+
width: 45%;
|
| 241 |
+
font-weight: 600;
|
| 242 |
+
white-space: nowrap;
|
| 243 |
+
}
|
| 244 |
+
.comment-field {
|
| 245 |
+
padding-left: 12px;
|
| 246 |
+
margin-left: -12px;
|
| 247 |
+
margin-right: -12px;
|
| 248 |
+
margin-bottom: 10px;
|
| 249 |
+
}
|
| 250 |
+
.actions {
|
| 251 |
+
padding-left: 12px;
|
| 252 |
+
padding-right: 12px;
|
| 253 |
+
}
|
| 254 |
+
.tenets-section {
|
| 255 |
+
padding: 15px;
|
| 256 |
+
}
|
| 257 |
+
}
|
| 258 |
+
</style>
|
| 259 |
+
</head>
|
| 260 |
+
<body>
|
| 261 |
+
<h1>Stock Analysis Record Application</h1>
|
| 262 |
+
|
| 263 |
+
<div class="container">
|
| 264 |
+
<div class="tab">
|
| 265 |
+
<button class="tablinks active" onclick="openTab(event, 'Input')">Input Record</button>
|
| 266 |
+
<button class="tablinks" onclick="openTab(event, 'View')">View & Manage Records</button>
|
| 267 |
+
</div>
|
| 268 |
+
|
| 269 |
+
<div id="Input" class="tabcontent" style="display: block;">
|
| 270 |
+
<form id="stockForm">
|
| 271 |
+
<input type="hidden" id="editIndex" value="-1">
|
| 272 |
+
|
| 273 |
+
<label for="symbol">Stock Symbol</label>
|
| 274 |
+
<input type="text" list="symbolList" id="symbol" required placeholder="Ketik atau pilih symbol yang sudah ada">
|
| 275 |
+
<datalist id="symbolList">
|
| 276 |
+
<!-- Options diisi secara dinamis -->
|
| 277 |
+
</datalist>
|
| 278 |
+
|
| 279 |
+
<label for="date">Analysis Date</label>
|
| 280 |
+
<input type="date" id="date" required>
|
| 281 |
+
|
| 282 |
+
<label for="historicalData">Historical Data (Comment)</label>
|
| 283 |
+
<textarea id="historicalData" rows="6" placeholder="Deskripsikan data historis, pola harga, volume, event penting, dll." required></textarea>
|
| 284 |
+
|
| 285 |
+
<label for="analysis">Analysis Notes (Comment)</label>
|
| 286 |
+
<textarea id="analysis" rows="6" placeholder="Catatan analisis lengkap: fundamental, technical, sentiment, risiko, dll." required></textarea>
|
| 287 |
+
|
| 288 |
+
<label for="support">Support Level</label>
|
| 289 |
+
<input type="number" step="0.01" id="support" required>
|
| 290 |
+
|
| 291 |
+
<label for="resistance">Resistance Level</label>
|
| 292 |
+
<input type="number" step="0.01" id="resistance" required>
|
| 293 |
+
|
| 294 |
+
<label for="mosPrice">MOS Price (Margin of Safety)</label>
|
| 295 |
+
<input type="number" step="0.01" id="mosPrice" required>
|
| 296 |
+
|
| 297 |
+
<label for="decision">Decision</label>
|
| 298 |
+
<select id="decision" required>
|
| 299 |
+
<option value="">-- Select Decision --</option>
|
| 300 |
+
<option value="Buy">Buy</option>
|
| 301 |
+
<option value="Sell">Sell</option>
|
| 302 |
+
<option value="Hold">Hold</option>
|
| 303 |
+
<option value="Watch">Watch</option>
|
| 304 |
+
<option value="Avoid">Avoid</option>
|
| 305 |
+
</select>
|
| 306 |
+
|
| 307 |
+
<button type="submit" id="submitButton">Save Record</button>
|
| 308 |
+
<button type="button" class="cancel" id="cancelButton" style="display:none;" onclick="cancelEdit()">Cancel Edit</button>
|
| 309 |
+
</form>
|
| 310 |
+
|
| 311 |
+
<div class="tenets-section">
|
| 312 |
+
<h3>Tenets & Notes for Stock Screening and Trading Operations</h3>
|
| 313 |
+
<p>Berikut adalah prinsip-prinsip utama (tenets) yang sering digunakan oleh trader profesional dunia untuk screening dan operasi saham. Gunakan sebagai panduan saat menganalisis.</p>
|
| 314 |
+
<ul>
|
| 315 |
+
<li><strong>Follow the Trend (Trend Following):</strong> "The trend is your friend." Masuk posisi sesuai arah tren utama; jangan melawan tren.</li>
|
| 316 |
+
<li><strong>Cut Losses Short, Let Profits Run:</strong> Potong kerugian cepat dengan stop-loss; biarkan keuntungan berjalan.</li>
|
| 317 |
+
<li><strong>Risk Management:</strong> Risiko maksimal 1-2% modal per trade; gunakan position sizing yang tepat.</li>
|
| 318 |
+
<li><strong>Never Add to a Losing Position:</strong> Jangan rata-rata posisi rugi (averaging down tanpa alasan kuat).</li>
|
| 319 |
+
<li><strong>Be Patient and Disciplined:</strong> Tunggu setup berkualitas; ikuti trading plan tanpa emosi.</li>
|
| 320 |
+
<li><strong>Value Investing:</strong> Beli saham undervalued dengan margin of safety (Warren Buffett style).</li>
|
| 321 |
+
<li><strong>Momentum Trading:</strong> Beli saham yang sedang kuat naik; ikuti momentum.</li>
|
| 322 |
+
<li><strong>Mean Reversion:</strong> Beli saat oversold, jual saat overbought; harga cenderung kembali ke rata-rata.</li>
|
| 323 |
+
<li><strong>Diversification:</strong> Jangan taruh semua modal di satu saham atau sektor.</li>
|
| 324 |
+
<li><strong>Screening Criteria Umum:</strong> Fundamental (P/E rendah, EPS growth tinggi, ROE >15%); Technical (di atas MA 200, RSI >50 untuk tren naik).</li>
|
| 325 |
+
</ul>
|
| 326 |
+
<p>Prinsip ini diadaptasi dari trader legendaris seperti Jesse Livermore, Paul Tudor Jones, dan Warren Buffett.</p>
|
| 327 |
+
</div>
|
| 328 |
+
</div>
|
| 329 |
+
|
| 330 |
+
<div id="View" class="tabcontent">
|
| 331 |
+
<form id="filterForm">
|
| 332 |
+
<div>
|
| 333 |
+
<label for="filterSymbol">Filter by Stock Symbol</label>
|
| 334 |
+
<input type="text" id="filterSymbol" placeholder="e.g., AAPL">
|
| 335 |
+
</div>
|
| 336 |
+
<div>
|
| 337 |
+
<label for="filterDecision">Filter by Decision</label>
|
| 338 |
+
<select id="filterDecision">
|
| 339 |
+
<option value="">-- All Decisions --</option>
|
| 340 |
+
<option value="Buy">Buy</option>
|
| 341 |
+
<option value="Sell">Sell</option>
|
| 342 |
+
<option value="Hold">Hold</option>
|
| 343 |
+
<option value="Watch">Watch</option>
|
| 344 |
+
<option value="Avoid">Avoid</option>
|
| 345 |
+
</select>
|
| 346 |
+
</div>
|
| 347 |
+
<div>
|
| 348 |
+
<button type="button" onclick="filterRecords()">Apply Filter</button>
|
| 349 |
+
</div>
|
| 350 |
+
<div>
|
| 351 |
+
<button type="button" onclick="displayRecords()">Clear Filter</button>
|
| 352 |
+
</div>
|
| 353 |
+
</form>
|
| 354 |
+
|
| 355 |
+
<div class="import-export">
|
| 356 |
+
<div>
|
| 357 |
+
<label for="importFile">Import from XLSX</label>
|
| 358 |
+
<input type="file" id="importFile" accept=".xlsx">
|
| 359 |
+
</div>
|
| 360 |
+
<button type="button" onclick="importExcel()">Import Records</button>
|
| 361 |
+
<button type="button" class="export-btn" onclick="exportToExcel()">Export to XLSX</button>
|
| 362 |
+
</div>
|
| 363 |
+
|
| 364 |
+
<table id="recordsTable">
|
| 365 |
+
<thead>
|
| 366 |
+
<tr>
|
| 367 |
+
<th>Stock Symbol</th>
|
| 368 |
+
<th>Analysis Date</th>
|
| 369 |
+
<th>Historical Data Comment</th>
|
| 370 |
+
<th>Analysis Notes Comment</th>
|
| 371 |
+
<th>Support Level</th>
|
| 372 |
+
<th>Resistance Level</th>
|
| 373 |
+
<th>MOS Price</th>
|
| 374 |
+
<th>Decision</th>
|
| 375 |
+
<th>Evaluation</th>
|
| 376 |
+
<th>Actions</th>
|
| 377 |
+
</tr>
|
| 378 |
+
</thead>
|
| 379 |
+
<tbody>
|
| 380 |
+
<!-- Records will be displayed here -->
|
| 381 |
+
</tbody>
|
| 382 |
+
</table>
|
| 383 |
+
</div>
|
| 384 |
+
</div>
|
| 385 |
+
|
| 386 |
+
<script>
|
| 387 |
+
function openTab(evt, tabName) {
|
| 388 |
+
const tabcontent = document.getElementsByClassName("tabcontent");
|
| 389 |
+
for (let i = 0; i < tabcontent.length; i++) {
|
| 390 |
+
tabcontent[i].style.display = "none";
|
| 391 |
+
}
|
| 392 |
+
const tablinks = document.getElementsByClassName("tablinks");
|
| 393 |
+
for (let i = 0; i < tablinks.length; i++) {
|
| 394 |
+
tablinks[i].className = tablinks[i].className.replace(" active", "");
|
| 395 |
+
}
|
| 396 |
+
document.getElementById(tabName).style.display = "block";
|
| 397 |
+
evt.currentTarget.className += " active";
|
| 398 |
+
|
| 399 |
+
if (tabName === 'View') {
|
| 400 |
+
displayRecords();
|
| 401 |
+
}
|
| 402 |
+
}
|
| 403 |
+
|
| 404 |
+
const form = document.getElementById('stockForm');
|
| 405 |
+
const tableBody = document.querySelector('#recordsTable tbody');
|
| 406 |
+
const symbolDatalist = document.getElementById('symbolList');
|
| 407 |
+
let records = JSON.parse(localStorage.getItem('stockRecords')) || [];
|
| 408 |
+
|
| 409 |
+
const decisionOptions = ["Buy", "Sell", "Hold", "Watch", "Avoid"];
|
| 410 |
+
|
| 411 |
+
function updateSymbolDatalist() {
|
| 412 |
+
const uniqueSymbols = [...new Set(records.map(r => r.symbol.toUpperCase()))].sort();
|
| 413 |
+
symbolDatalist.innerHTML = '';
|
| 414 |
+
uniqueSymbols.forEach(sym => {
|
| 415 |
+
const option = document.createElement('option');
|
| 416 |
+
option.value = sym;
|
| 417 |
+
symbolDatalist.appendChild(option);
|
| 418 |
+
});
|
| 419 |
+
}
|
| 420 |
+
|
| 421 |
+
updateSymbolDatalist();
|
| 422 |
+
|
| 423 |
+
function displayRecords(filteredRecords = records) {
|
| 424 |
+
tableBody.innerHTML = '';
|
| 425 |
+
if (filteredRecords.length === 0) {
|
| 426 |
+
const tr = document.createElement('tr');
|
| 427 |
+
tr.innerHTML = '<td colspan="10" style="text-align:center;padding:20px;">No records found.</td>';
|
| 428 |
+
tableBody.appendChild(tr);
|
| 429 |
+
return;
|
| 430 |
+
}
|
| 431 |
+
|
| 432 |
+
filteredRecords.forEach((record, index) => {
|
| 433 |
+
const globalIndex = records.indexOf(record);
|
| 434 |
+
const tr = document.createElement('tr');
|
| 435 |
+
tr.innerHTML = `
|
| 436 |
+
<td data-label="Stock Symbol">${record.symbol}</td>
|
| 437 |
+
<td data-label="Analysis Date">${record.date}</td>
|
| 438 |
+
<td data-label="Historical Data Comment" class="comment-field">${record.historicalData || '-'}</td>
|
| 439 |
+
<td data-label="Analysis Notes Comment" class="comment-field">${record.analysis || '-'}</td>
|
| 440 |
+
<td data-label="Support Level">${record.support}</td>
|
| 441 |
+
<td data-label="Resistance Level">${record.resistance}</td>
|
| 442 |
+
<td data-label="MOS Price">${record.mosPrice}</td>
|
| 443 |
+
<td data-label="Decision"><strong>${record.decision}</strong></td>
|
| 444 |
+
<td data-label="Evaluation">${evaluateDecision(record)}</td>
|
| 445 |
+
<td data-label="Actions" class="actions">
|
| 446 |
+
<button class="edit-btn" onclick="editRecord(${globalIndex})">Edit</button>
|
| 447 |
+
<button class="delete-btn" onclick="deleteRecord(${globalIndex})">Delete</button>
|
| 448 |
+
</td>
|
| 449 |
+
`;
|
| 450 |
+
tableBody.appendChild(tr);
|
| 451 |
+
});
|
| 452 |
+
}
|
| 453 |
+
|
| 454 |
+
function evaluateDecision(record) {
|
| 455 |
+
const decision = record.decision;
|
| 456 |
+
if (decision === 'Buy') return 'This decision suggests potential growth based on the analysis.';
|
| 457 |
+
if (decision === 'Sell') return 'This decision indicates a need to mitigate risks identified in the analysis.';
|
| 458 |
+
if (decision === 'Hold') return 'This decision reflects a stable outlook per the provided data.';
|
| 459 |
+
if (decision === 'Watch') return 'Monitoring recommended for potential future opportunity or risk.';
|
| 460 |
+
if (decision === 'Avoid') return 'Recommendation to steer clear due to unfavorable conditions.';
|
| 461 |
+
return 'Decision evaluation not available.';
|
| 462 |
+
}
|
| 463 |
+
|
| 464 |
+
function editRecord(index) {
|
| 465 |
+
const record = records[index];
|
| 466 |
+
document.getElementById('symbol').value = record.symbol;
|
| 467 |
+
document.getElementById('date').value = record.date;
|
| 468 |
+
document.getElementById('historicalData').value = record.historicalData;
|
| 469 |
+
document.getElementById('analysis').value = record.analysis;
|
| 470 |
+
document.getElementById('support').value = record.support;
|
| 471 |
+
document.getElementById('resistance').value = record.resistance;
|
| 472 |
+
document.getElementById('mosPrice').value = record.mosPrice;
|
| 473 |
+
document.getElementById('decision').value = record.decision;
|
| 474 |
+
document.getElementById('editIndex').value = index;
|
| 475 |
+
document.getElementById('submitButton').textContent = 'Update Record';
|
| 476 |
+
document.getElementById('cancelButton').style.display = 'inline-block';
|
| 477 |
+
|
| 478 |
+
openTab({currentTarget: document.querySelector('[onclick="openTab(event, \'Input\')"]')}, 'Input');
|
| 479 |
+
}
|
| 480 |
+
|
| 481 |
+
function cancelEdit() {
|
| 482 |
+
form.reset();
|
| 483 |
+
document.getElementById('decision').value = "";
|
| 484 |
+
document.getElementById('editIndex').value = '-1';
|
| 485 |
+
document.getElementById('submitButton').textContent = 'Save Record';
|
| 486 |
+
document.getElementById('cancelButton').style.display = 'none';
|
| 487 |
+
}
|
| 488 |
+
|
| 489 |
+
function deleteRecord(index) {
|
| 490 |
+
if (confirm('Are you sure you want to delete this record?')) {
|
| 491 |
+
records.splice(index, 1);
|
| 492 |
+
localStorage.setItem('stockRecords', JSON.stringify(records));
|
| 493 |
+
updateSymbolDatalist();
|
| 494 |
+
displayRecords();
|
| 495 |
+
}
|
| 496 |
+
}
|
| 497 |
+
|
| 498 |
+
form.addEventListener('submit', (e) => {
|
| 499 |
+
e.preventDefault();
|
| 500 |
+
|
| 501 |
+
const editIndex = parseInt(document.getElementById('editIndex').value);
|
| 502 |
+
const symbolValue = document.getElementById('symbol').value.trim().toUpperCase();
|
| 503 |
+
|
| 504 |
+
const newRecord = {
|
| 505 |
+
symbol: symbolValue,
|
| 506 |
+
date: document.getElementById('date').value,
|
| 507 |
+
historicalData: document.getElementById('historicalData').value.trim(),
|
| 508 |
+
analysis: document.getElementById('analysis').value.trim(),
|
| 509 |
+
support: document.getElementById('support').value,
|
| 510 |
+
resistance: document.getElementById('resistance').value,
|
| 511 |
+
mosPrice: document.getElementById('mosPrice').value,
|
| 512 |
+
decision: document.getElementById('decision').value
|
| 513 |
+
};
|
| 514 |
+
|
| 515 |
+
if (editIndex === -1) {
|
| 516 |
+
records.push(newRecord);
|
| 517 |
+
} else {
|
| 518 |
+
records[editIndex] = newRecord;
|
| 519 |
+
}
|
| 520 |
+
|
| 521 |
+
localStorage.setItem('stockRecords', JSON.stringify(records));
|
| 522 |
+
updateSymbolDatalist();
|
| 523 |
+
cancelEdit();
|
| 524 |
+
alert(editIndex === -1 ? 'Record saved successfully.' : 'Record updated successfully.');
|
| 525 |
+
|
| 526 |
+
if (document.getElementById('View').style.display === 'block') {
|
| 527 |
+
displayRecords();
|
| 528 |
+
}
|
| 529 |
+
});
|
| 530 |
+
|
| 531 |
+
function filterRecords() {
|
| 532 |
+
const filterSymbol = document.getElementById('filterSymbol').value.toLowerCase().trim();
|
| 533 |
+
const filterDecision = document.getElementById('filterDecision').value;
|
| 534 |
+
|
| 535 |
+
const filtered = records.filter(record => {
|
| 536 |
+
const matchesSymbol = filterSymbol ? record.symbol.toLowerCase().includes(filterSymbol) : true;
|
| 537 |
+
const matchesDecision = filterDecision ? record.decision === filterDecision : true;
|
| 538 |
+
return matchesSymbol && matchesDecision;
|
| 539 |
+
});
|
| 540 |
+
|
| 541 |
+
displayRecords(filtered);
|
| 542 |
+
}
|
| 543 |
+
|
| 544 |
+
function exportToExcel() {
|
| 545 |
+
const ws = XLSX.utils.json_to_sheet(records);
|
| 546 |
+
const wb = XLSX.utils.book_new();
|
| 547 |
+
XLSX.utils.book_append_sheet(wb, ws, "StockRecords");
|
| 548 |
+
XLSX.writeFile(wb, "Stock_Analysis_Records.xlsx");
|
| 549 |
+
}
|
| 550 |
+
|
| 551 |
+
function importExcel() {
|
| 552 |
+
const fileInput = document.getElementById('importFile');
|
| 553 |
+
const file = fileInput.files[0];
|
| 554 |
+
if (!file) {
|
| 555 |
+
alert('Please select an XLSX file.');
|
| 556 |
+
return;
|
| 557 |
+
}
|
| 558 |
+
|
| 559 |
+
const reader = new FileReader();
|
| 560 |
+
reader.onload = function(e) {
|
| 561 |
+
const data = e.target.result;
|
| 562 |
+
const workbook = XLSX.read(data, { type: 'binary' });
|
| 563 |
+
const sheetName = workbook.SheetNames[0];
|
| 564 |
+
const importedRecords = XLSX.utils.sheet_to_json(workbook.Sheets[sheetName]);
|
| 565 |
+
|
| 566 |
+
let addedCount = 0;
|
| 567 |
+
importedRecords.forEach(imp => {
|
| 568 |
+
if (imp.symbol && imp.date && imp.historicalData && imp.analysis &&
|
| 569 |
+
imp.support !== undefined && imp.resistance !== undefined &&
|
| 570 |
+
imp.mosPrice !== undefined && imp.decision &&
|
| 571 |
+
decisionOptions.includes(imp.decision)) {
|
| 572 |
+
imp.symbol = imp.symbol.toString().trim().toUpperCase();
|
| 573 |
+
records.push(imp);
|
| 574 |
+
addedCount++;
|
| 575 |
+
}
|
| 576 |
+
});
|
| 577 |
+
|
| 578 |
+
if (addedCount > 0) {
|
| 579 |
+
localStorage.setItem('stockRecords', JSON.stringify(records));
|
| 580 |
+
updateSymbolDatalist();
|
| 581 |
+
displayRecords();
|
| 582 |
+
alert(`${addedCount} valid records imported successfully.`);
|
| 583 |
+
} else {
|
| 584 |
+
alert('No valid records found in the imported file.');
|
| 585 |
+
}
|
| 586 |
+
fileInput.value = '';
|
| 587 |
+
};
|
| 588 |
+
reader.readAsBinaryString(file);
|
| 589 |
+
}
|
| 590 |
+
|
| 591 |
+
displayRecords();
|
| 592 |
+
</script>
|
| 593 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-qwensite.hf.space/logo.svg" alt="qwensite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-qwensite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >QwenSite</a> - 🧬 <a href="https://enzostvs-qwensite.hf.space?remix=alterzick/stock-record-v1" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 594 |
+
</html>
|
prompts.txt
ADDED
|
File without changes
|