diff --git a/Bracket Playbook NQ, Gold + Crude on LucidPro 50K.pdf b/Bracket Playbook NQ, Gold + Crude on LucidPro 50K.pdf new file mode 100644 index 0000000..7c83716 Binary files /dev/null and b/Bracket Playbook NQ, Gold + Crude on LucidPro 50K.pdf differ diff --git a/TODO.txt b/TODO.txt new file mode 100644 index 0000000..d2653b3 --- /dev/null +++ b/TODO.txt @@ -0,0 +1,3 @@ +3. Lucid rule-change watcher (scheduled task) +A weekly check of Lucid’s payout, hedging, daily loss limit and evaluation pages. It flags any wording change and re-runs the per-evaluation numbers if a rule moved. Since your main risk is a closing window, this is the early warning. + diff --git a/pine/bracket_morning_panel.pine b/pine/bracket_morning_panel.pine index 3b9c2f9..74f5e1a 100644 --- a/pine/bracket_morning_panel.pine +++ b/pine/bracket_morning_panel.pine @@ -4,14 +4,19 @@ // Gap above the threshold -> LONG, otherwise SHORT. // Crude (entry 9:01): yesterday's 2:30 pm settlement vs yesterday's 9:00 candle close. // Settled higher -> SHORT today, lower -> LONG. -// NG (entry 9:01): always the SAME side as crude (energy group: opposite sides would be hedging). +// NG (entry 6:01 pm, at the evening reopen, for the NEXT trading day): always the SAME side as crude +// (energy group: opposite sides would be hedging). Crude's side for that day is already set by the 2:30 pm +// settlement, so the panel shows it from 6:00 pm. Hold to the usual 4:40 pm exit next day. // NQ (entry 9:31): today's 9:30 candle close vs yesterday's 4:00 pm close (3:59 candle). // Above -> SHORT, below -> LONG. // Sizing: contracts = round(stop $ / ($ per point x 0.20 x daily ATR(14))), min 1, max 4; // stop pts = (stop $ - $20 x contracts) / (contracts x $ per point); target pts = (target $ + commission x contracts) / (contracts x $ per point). // Use a 1-MINUTE chart of any CME futures symbol with the full electronic session. -// Set each contract below to the exact month you trade (e.g. NQZ2026), not a continuous "1!" chart. +// Continuous "1!" symbols are fine (roll days change the NQ side about once a year and a few gold signals a year). +// Exact months (e.g. NQZ2026) avoid even that, if you prefer. // Skip US market holidays and early-close days. The Bracket Tracker remains the source for each account's own stop/target $. +// Signals lock when the decision candle closes (gold: 8:19 candle, NQ: 9:30 candle); until then the side shows "waiting". +// Set alerts to "Once Per Bar Close". indicator("Bracket Morning Panel", overlay = false) // own pane below the chart, so the table never covers price tz = "America/New_York" @@ -117,7 +122,7 @@ if timeframe.change("D") goldDir := 0 goldGap := na -if isGoldDecision and not na(gap) +if isGoldDecision and not na(gap) and barstate.isconfirmed // only once the 8:19 candle has closed: no flicker liveMed := hist.size() >= minDays thr := liveMed ? hist.median() : thrInput // prior days only: no look-ahead goldGap := gap @@ -126,6 +131,19 @@ if isGoldDecision and not na(gap) if hist.size() > lookback hist.shift() +// ---------- NQ decision, locked at the close of the 9:30 candle ---------- +var int nqShow = 0 +var float nqShowRef = na +var float nqShowPx = na +if timeframe.change("D") + nqShow := 0 + nqShowRef := na + nqShowPx := na +if barstate.isconfirmed and nqDir != 0 and nqShow == 0 + nqShow := nqDir + nqShowRef := nqRef + nqShowPx := nqPx + // ---------- sizing ---------- [gcN, gcSp, gcTp, gcRiskUsd, gcRewUsd] = sizeFor(gcAtr, gcPv, gcMt, gcComm) [clN, clSp, clTp, clRiskUsd, clRewUsd] = sizeFor(clAtr, clPv, clMt, clComm) @@ -167,9 +185,9 @@ if barstate.islast table.cell(t, 9, 2, num(clTp), text_color = color.new(color.lime, 40)) table.cell(t, 0, 3, "Nat gas", text_color = color.white) - table.cell(t, 1, 3, "9:01", text_color = color.white) + table.cell(t, 1, 3, "6:01 pm (prev. eve)", text_color = color.white) table.cell(t, 2, 3, sideText(clDir), text_color = sideColor(clDir)) - table.cell(t, 3, 3, "same side as crude (no hedging)", text_color = color.white) + table.cell(t, 3, 3, "crude's side for the trading day that opens at 6 pm (no hedging)", text_color = color.white) table.cell(t, 4, 3, num(ngAtr), text_color = color.white) table.cell(t, 5, 3, num(ngN), text_color = color.white) table.cell(t, 6, 3, usd(ngRiskUsd), text_color = color.red) @@ -179,8 +197,8 @@ if barstate.islast table.cell(t, 0, 4, "NQ", text_color = color.white) table.cell(t, 1, 4, "9:31", text_color = color.white) - table.cell(t, 2, 4, sideText(nqDir), text_color = sideColor(nqDir)) - table.cell(t, 3, 4, "9:30 close " + num(nqPx) + " vs prior 4:00 close " + num(nqRef), text_color = color.white) + table.cell(t, 2, 4, sideText(nqShow), text_color = sideColor(nqShow)) + table.cell(t, 3, 4, "9:30 close " + num(nqShowPx) + " vs prior 4:00 close " + num(nqShowRef), text_color = color.white) table.cell(t, 4, 4, num(nqAtr), text_color = color.white) table.cell(t, 5, 4, num(nqN), text_color = color.white) table.cell(t, 6, 4, usd(nqRiskUsd), text_color = color.red) @@ -193,11 +211,11 @@ if barstate.islast table.merge_cells(t, 0, 5, 9, 5) // ---------- alerts ---------- -alertcondition(isGoldDecision and goldDir == 1, "Gold LONG", "Gold bracket LONG at 8:21 ET") -alertcondition(isGoldDecision and goldDir == -1, "Gold SHORT", "Gold bracket SHORT at 8:21 ET") +alertcondition(isGoldDecision and barstate.isconfirmed and goldDir == 1, "Gold LONG", "Gold bracket LONG at 8:21 ET") +alertcondition(isGoldDecision and barstate.isconfirmed and goldDir == -1, "Gold SHORT", "Gold bracket SHORT at 8:21 ET") alertcondition(endsAt(9, 0) and clDir == 1, "Crude LONG", "Crude bracket LONG at 9:01 ET") alertcondition(endsAt(9, 0) and clDir == -1, "Crude SHORT", "Crude bracket SHORT at 9:01 ET") -alertcondition(endsAt(9, 0) and clDir == 1, "Nat gas LONG", "Nat gas bracket LONG at 9:01 ET (same side as crude)") -alertcondition(endsAt(9, 0) and clDir == -1, "Nat gas SHORT", "Nat gas bracket SHORT at 9:01 ET (same side as crude)") -alertcondition(endsAt(9, 31) and nqDir == 1, "NQ LONG", "NQ bracket LONG at 9:31 ET") -alertcondition(endsAt(9, 31) and nqDir == -1, "NQ SHORT", "NQ bracket SHORT at 9:31 ET") +alertcondition(endsAt(18, 1) and barstate.isconfirmed and clDir == 1, "Nat gas LONG", "Nat gas bracket LONG at 6:01 pm ET for the next trading day (same side as crude)") +alertcondition(endsAt(18, 1) and barstate.isconfirmed and clDir == -1, "Nat gas SHORT", "Nat gas bracket SHORT at 6:01 pm ET for the next trading day (same side as crude)") +alertcondition(endsAt(9, 31) and barstate.isconfirmed and nqDir == 1, "NQ LONG", "NQ bracket LONG at 9:31 ET") +alertcondition(endsAt(9, 31) and barstate.isconfirmed and nqDir == -1, "NQ SHORT", "NQ bracket SHORT at 9:31 ET")