修复趋势回调顺势加仓的交易记录

This commit is contained in:
dekun
2026-05-29 18:39:40 +08:00
parent 7af2717331
commit 81f27765ca
10 changed files with 202 additions and 47 deletions
+11 -4
View File
@@ -1402,11 +1402,18 @@ function fillJournalFromTrade(t){
setJournalField("early_exit_trigger", "");
setJournalField("early_exit_note", "");
const kst = String(t.key_signal_type || "").trim();
const erFromKey = KEY_ENTRY_REASON_BY_SIGNAL[kst] || "";
if(erFromKey && JOURNAL_ENTRY_REASON_OPTIONS.includes(erFromKey)){
setJournalField("entry_reason", erFromKey);
const mt = String(t.monitor_type || "").trim();
if(mt === "趋势回调" && JOURNAL_ENTRY_REASON_OPTIONS.includes("趋势回调")){
setJournalField("entry_reason", "趋势回调");
} else if(mt === "顺势加仓" && JOURNAL_ENTRY_REASON_OPTIONS.includes("顺势加仓")){
setJournalField("entry_reason", "顺势加仓");
} else {
setJournalField("entry_reason", "");
const erFromKey = KEY_ENTRY_REASON_BY_SIGNAL[kst] || "";
if(erFromKey && JOURNAL_ENTRY_REASON_OPTIONS.includes(erFromKey)){
setJournalField("entry_reason", erFromKey);
} else {
setJournalField("entry_reason", "");
}
}
setJournalField("entry_reason_custom", "");
syncJournalEntryReasonOtherUi();