neuroalpha 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/public/app.js +21 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neuroalpha",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "НейроАльфа — ИИ-автопилот для рынка акций Мосбиржи: эмбеддинги акций, самообучение правил, коннекторы Т-Банк / БКС / Финам / Алор и боты Telegram / MAX",
|
|
5
5
|
"author": "Roman A. Perepelkin",
|
|
6
6
|
"license": "UNLICENSED",
|
package/public/app.js
CHANGED
|
@@ -1166,6 +1166,27 @@ async function loadForecast(force, silent = false) {
|
|
|
1166
1166
|
nearByDay.get(dk).push(ep);
|
|
1167
1167
|
}
|
|
1168
1168
|
const nearDays = [...nearByDay.keys()].sort((a, b) => b.localeCompare(a));
|
|
1169
|
+
const dayCountsStr = (arr) => `${arr.filter((x) => x.status === 'signal').length} сигн., ${arr.filter((x) => x.status === 'blocked').length} блок., ${arr.filter((x) => x.status === 'near').length} почти`;
|
|
1170
|
+
const nearEpRow = (ep) => {
|
|
1171
|
+
const tRange = ep.firstBar && ep.lastBar && ep.firstBar !== ep.lastBar ? `${ep.firstBar}–${ep.lastBar} (${ep.barsCount} св.)` : `${ep.peakBar || ep.lastBar || ''}`;
|
|
1172
|
+
const isSh = ep.side === 'short';
|
|
1173
|
+
const thrStr = `${isSh ? '−' : '+'}${fmtNum(ep.thresholdPct, 2)}%`;
|
|
1174
|
+
const stBadge = ep.status === 'signal'
|
|
1175
|
+
? `<span class="tag ok">${isSh ? '✓ сигнал шорт' : '✓ сигнал купить'}</span>`
|
|
1176
|
+
: ep.status === 'blocked'
|
|
1177
|
+
? '<span class="tag blocked">⛔ блок входа</span>'
|
|
1178
|
+
: `<span class="tag mid">почти (${ep.peakRatioPct}%)</span>`;
|
|
1179
|
+
const rowCls = ep.status === 'signal' ? ' class="best"' : ep.status === 'blocked' ? ' class="fc-blocked"' : '';
|
|
1180
|
+
return `<tr${rowCls}>
|
|
1181
|
+
<td class="muted small" style="white-space:nowrap">${esc(tRange)}</td>
|
|
1182
|
+
<td style="white-space:nowrap"><span class="sym-link" data-sym="${esc(ep.symbol)}" title="Открыть досье акции ${esc(ep.symbol)}"><b>${esc(ep.symbol)}</b> <span class="muted small">${esc(ep.name || '')}</span></span></td>
|
|
1183
|
+
<td class="${isSh ? 'neg' : 'pos'} small" style="white-space:nowrap">${isSh ? 'В шорт' : 'В покупку'}</td>
|
|
1184
|
+
<td class="num ${cls(ep.peakExpectedPct)}" style="white-space:nowrap"><b>${fmtPct(ep.peakExpectedPct, 2)}</b></td>
|
|
1185
|
+
<td class="num muted small" style="white-space:nowrap">${thrStr}</td>
|
|
1186
|
+
<td class="num small" style="white-space:nowrap"><b>${ep.peakRatioPct}%</b></td>
|
|
1187
|
+
<td class="small" style="white-space:normal">${stBadge} <span class="muted">${esc(ep.reasonText || '')}</span></td>
|
|
1188
|
+
</tr>`;
|
|
1189
|
+
};
|
|
1169
1190
|
const buildNearInnerHtml = () => {
|
|
1170
1191
|
if (nearDayFilter !== 'all' && !nearByDay.has(nearDayFilter)) nearDayFilter = '';
|
|
1171
1192
|
const activeNearDay = nearDayFilter || nearDays[0] || 'all';
|