前端库本地自带(Vue生产版/ElementPlus压缩版,去unpkg依赖); 策略术语改写(已武装→回落即止盈,未平回→在手T仓等)
This commit is contained in:
parent
1fde77f728
commit
2cb2e1a29c
|
|
@ -449,7 +449,7 @@ def _eval_trail(st, pos, day, now, ctx):
|
||||||
state["high_water"] = round(hw, 3)
|
state["high_water"] = round(hw, 3)
|
||||||
if not state.get("armed") and profit >= start_line:
|
if not state.get("armed") and profit >= start_line:
|
||||||
state["armed"] = True
|
state["armed"] = True
|
||||||
ctx["notes"].append(f"{st['ts_code']} 跟踪止盈已武装(浮盈 {profit:.1%} ≥ 启动线 {start_line:.1%})")
|
ctx["notes"].append(f"{st['ts_code']} 跟踪止盈已启动(浮盈 {profit:.1%} ≥ 启动线 {start_line:.1%})")
|
||||||
|
|
||||||
if avail < LOT:
|
if avail < LOT:
|
||||||
return None # 无 T+1 可卖, 只更新高水位
|
return None # 无 T+1 可卖, 只更新高水位
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,10 @@
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>PMS 持仓管理系统</title>
|
<title>PMS 持仓管理系统</title>
|
||||||
<link rel="stylesheet" href="https://unpkg.com/element-plus/dist/index.css"/>
|
<link rel="stylesheet" href="/static/vendor/element-plus.css"/>
|
||||||
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
|
<script src="/static/vendor/vue.global.js"></script>
|
||||||
<script src="https://unpkg.com/element-plus"></script>
|
<script src="/static/vendor/element-plus.js"></script>
|
||||||
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
|
<script src="/static/vendor/axios.min.js"></script>
|
||||||
<style>
|
<style>
|
||||||
:root, html[data-theme=light]{
|
:root, html[data-theme=light]{
|
||||||
--plane:#f4f5f2; --surface:#ffffff; --surface-2:#fafaf8; --ink:#141412; --ink-2:#54534f; --muted:#8a8882;
|
--plane:#f4f5f2; --surface:#ffffff; --surface-2:#fafaf8; --ink:#141412; --ink-2:#54534f; --muted:#8a8882;
|
||||||
|
|
@ -2108,10 +2108,10 @@ createApp({
|
||||||
function stratStateText(s) {
|
function stratStateText(s) {
|
||||||
const st = s.state || {};
|
const st = s.state || {};
|
||||||
if (s.type === 'T0') return '今日 ' + (st.t_count_today || 0) + '/3 次'
|
if (s.type === 'T0') return '今日 ' + (st.t_count_today || 0) + '/3 次'
|
||||||
+ (st.open_leg ? (' · 有未平回的做T(' + (st.open_leg.dir === 'long' ? '正T已买待卖' : '反T已卖待买回') + ')') : ' · 今日无未平回');
|
+ (st.open_leg ? (' · 有在手T仓(' + (st.open_leg.dir === 'long' ? '已买待卖' : '已卖待买回') + ')') : ' · 今日无在手T仓');
|
||||||
if (s.type === 'GRID') return '已买 ' + Object.keys(st.filled_levels || {}).length + ' 档 · 投入 '
|
if (s.type === 'GRID') return '已买 ' + Object.keys(st.filled_levels || {}).length + ' 档 · 投入 '
|
||||||
+ money(st.invested || 0) + (st.below_floor ? ' · 跌破下界已停买' : '');
|
+ money(st.invested || 0) + (st.below_floor ? ' · 跌破下界已停买' : '');
|
||||||
if (s.type === 'TRAIL') return '高点 ' + (st.high_water || '—') + ' · ' + (st.armed ? '已武装' : '未武装');
|
if (s.type === 'TRAIL') return '高点 ' + (st.high_water || '—') + ' · ' + (st.armed ? '回落即止盈' : '未到止盈线');
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
async function ops(name) {
|
async function ops(name) {
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue