ad
This commit is contained in:
1 parent
868751f464
commit
fb5f9de774
2 files changed
+35
-26
No files matched your search
@@ -33,7 +33,7 @@
|
||||
// Works on any chart timeframe (1 min, 5 min, 1 hour...): every signal is computed from 1-minute data of each contract.
|
||||
// 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. Per-account stop/target $: the account table (bottom right; fill it in Settings).
|
||||
// Skip US market holidays and early-close days. Per-account stop/target $: the account rows under the market rows (fill them in Settings).
|
||||
// Signals lock the moment the decision candle has closed (gold: 8:19 candle -> shown from 8:20; NQ: the 8:30 / 9:30 candle -> from 8:31 / 9:31, else the 8:32 / 9:32 candle -> from 8:33 / 9:33),
|
||||
// using that candle's final close, so they never flicker. Until then the side shows "waiting".
|
||||
// Set alerts to "Once Per Bar" so they fire the moment the side is known (with "Once Per Bar Close" a 5-minute chart alerts up to 5 minutes late).
|
||||
@@ -344,7 +344,7 @@ nqEntry = pending ? (useNews ? "8:31 / 8:33 / 9:31 / 9:33" : "9:31 / 9:33") :
|
||||
|
||||
// ---------- display ----------
|
||||
|
||||
var table t = table.new(position.top_right, 10, 6, bgcolor = color.new(color.black, 15), border_width = 1)
|
||||
var table t = table.new(position.top_right, 13, 17, bgcolor = color.new(color.black, 15), border_width = 1)
|
||||
if barstate.islast
|
||||
hdr = array.from("Market", "Entry (ET)", "Side", "Why", "ATR(14)", "Contracts", "Risk USD", "Reward USD", "Stop (pts)", "Target (pts)")
|
||||
for i = 0 to 9
|
||||
@@ -396,9 +396,9 @@ if barstate.islast
|
||||
table.cell(t, 9, 4, pts(nqTp), text_color = color.new(color.lime, 40))
|
||||
|
||||
endTxt = not endOn ? "" : needUsd <= endThr ? "ENDGAME: needs " + usd(needUsd) + " -> 1:1 stop (" + usd(needUsd) + "). Set back to 0 for other accounts. " : "ENDGAME: needs " + usd(needUsd) + " -> target " + usd(needUsd) + ", stop all the room. Set back to 0 for other accounts. "
|
||||
note = endTxt + "Stop = exactly the room (no cost allowance; a stop-out ends the account either way). Target includes commission. Type as shown. Yellow = micros. Per-account sizes: account table (bottom right). Skip holidays and early closes."
|
||||
note = endTxt + "Stop = exactly the room (no cost allowance; a stop-out ends the account either way). Target includes commission. Type as shown. Yellow = micros. Per-account sizes: account rows below. Skip holidays and early closes."
|
||||
table.cell(t, 0, 5, note, text_color = color.new(color.white, 30), text_size = size.small)
|
||||
table.merge_cells(t, 0, 5, 9, 5)
|
||||
table.merge_cells(t, 0, 5, 12, 5)
|
||||
|
||||
// ---------- account table (per-account sizing for manual trading) ----------
|
||||
grpA = "Account table"
|
||||
@@ -517,19 +517,18 @@ sizeAcct(atrD, pv, mt, comm, commM, ratio, mtM, bool forceFull, float stopU, flo
|
||||
tp = math.ceil((tgtU + cm * n) / (n * p) / tk - 1e-6) * tk
|
||||
[n, sp, tp, sp * n * p, tp * n * p, micro]
|
||||
|
||||
var table tAcc = table.new(position.bottom_right, 13, 11, bgcolor = color.new(color.black, 15), border_width = 1)
|
||||
if barstate.islast
|
||||
table.clear(t, 0, 6, 12, 16)
|
||||
if barstate.islast and showAcct
|
||||
hdr2 = array.from("#", "Account", "Market", "Stage", "Side", "Entry (ET)", "Stop $ (room)", "Target $", "Contracts", "Stop (pts)", "Target (pts)", "Reward : risk", "Note")
|
||||
hdr2 = array.from("#", "Account", "Market", "Stage", "Side", "Entry (ET)", "Risk USD", "Reward USD", "Contracts", "Stop (pts)", "Target (pts)", "Reward : risk", "Note")
|
||||
for i = 0 to 12
|
||||
table.cell(tAcc, i, 0, hdr2.get(i), text_color = color.white, bgcolor = color.new(color.gray, 60), text_size = size.small)
|
||||
table.cell(t, i, 6, hdr2.get(i), text_color = color.white, bgcolor = color.new(color.gray, 60), text_size = size.small)
|
||||
int rr = 6
|
||||
for k = 0 to 9
|
||||
r = k + 1
|
||||
mk = aMkt.get(k)
|
||||
if mk == "Off"
|
||||
table.cell(tAcc, 0, r, str.tostring(r), text_color = color.gray, text_size = size.small)
|
||||
for c = 1 to 12
|
||||
table.cell(tAcc, c, r, "", text_size = size.small)
|
||||
else
|
||||
if mk != "Off"
|
||||
rr += 1
|
||||
r = rr
|
||||
bal = aBal.get(k)
|
||||
flr = aFlr.get(k)
|
||||
room = bal - flr
|
||||
@@ -610,19 +609,22 @@ if barstate.islast and showAcct
|
||||
mic := m1
|
||||
sfx = not mic ? "" : mk == "Gold" ? " MGC" : mk == "Crude" ? " MCL" : mk == "NQ" ? " MNQ" : " QG"
|
||||
txt = bad ? color.gray : color.white
|
||||
table.cell(tAcc, 0, r, str.tostring(r), text_color = color.white, text_size = size.small)
|
||||
table.cell(tAcc, 1, r, aName.get(k), text_color = color.white, text_size = size.small)
|
||||
table.cell(tAcc, 2, r, mk, text_color = color.white, text_size = size.small)
|
||||
table.cell(tAcc, 3, r, aStg.get(k), text_color = isF ? color.aqua : color.white, text_size = size.small)
|
||||
table.cell(tAcc, 4, r, bad ? "-" : sideText(side), text_color = bad ? color.gray : sideColor(side), text_size = size.small)
|
||||
table.cell(tAcc, 5, r, bad ? "-" : ent, text_color = txt, text_size = size.small)
|
||||
table.cell(tAcc, 6, r, bad ? "-" : usd(stopU), text_color = bad ? color.gray : color.red, text_size = size.small)
|
||||
table.cell(tAcc, 7, r, bad ? "-" : usd(tgtU), text_color = bad ? color.gray : color.lime, text_size = size.small)
|
||||
table.cell(tAcc, 8, r, bad ? "-" : str.tostring(n) + sfx, text_color = mic ? color.yellow : txt, text_size = size.small)
|
||||
table.cell(tAcc, 9, r, bad ? "-" : pts(sp), text_color = bad ? color.gray : color.new(color.red, 40), text_size = size.small)
|
||||
table.cell(tAcc, 10, r, bad ? "-" : pts(tp), text_color = bad ? color.gray : color.new(color.lime, 40), text_size = size.small)
|
||||
table.cell(tAcc, 11, r, bad or na(rU) or rU <= 0 ? "-" : str.tostring(wU / rU, "#.##") + " : 1", text_color = txt, text_size = size.small)
|
||||
table.cell(tAcc, 12, r, note, text_color = bad ? color.orange : color.new(color.white, 30), text_size = size.small)
|
||||
table.cell(t, 0, r, str.tostring(k + 1), text_color = color.white, text_size = size.small)
|
||||
table.cell(t, 1, r, aName.get(k), text_color = color.white, text_size = size.small)
|
||||
table.cell(t, 2, r, mk, text_color = color.white, text_size = size.small)
|
||||
table.cell(t, 3, r, aStg.get(k), text_color = isF ? color.aqua : color.white, text_size = size.small)
|
||||
table.cell(t, 4, r, bad ? "-" : sideText(side), text_color = bad ? color.gray : sideColor(side), text_size = size.small)
|
||||
table.cell(t, 5, r, bad ? "-" : ent, text_color = txt, text_size = size.small)
|
||||
table.cell(t, 6, r, bad ? "-" : usd(rU), text_color = bad ? color.gray : color.red, text_size = size.small)
|
||||
table.cell(t, 7, r, bad ? "-" : usd(wU), text_color = bad ? color.gray : color.lime, text_size = size.small)
|
||||
table.cell(t, 8, r, bad ? "-" : str.tostring(n) + sfx, text_color = mic ? color.yellow : txt, text_size = size.small)
|
||||
table.cell(t, 9, r, bad ? "-" : pts(sp), text_color = bad ? color.gray : color.new(color.red, 40), text_size = size.small)
|
||||
table.cell(t, 10, r, bad ? "-" : pts(tp), text_color = bad ? color.gray : color.new(color.lime, 40), text_size = size.small)
|
||||
table.cell(t, 11, r, bad or na(rU) or rU <= 0 ? "-" : str.tostring(wU / rU, "#.##") + " : 1", text_color = txt, text_size = size.small)
|
||||
table.cell(t, 12, r, note, text_color = bad ? color.orange : color.new(color.white, 30), text_size = size.small)
|
||||
if rr == 6
|
||||
table.cell(t, 0, 7, "No accounts entered: fill Account 1-10 in Settings (Market not Off).", text_color = color.new(color.white, 30), text_size = size.small)
|
||||
table.merge_cells(t, 0, 7, 12, 7)
|
||||
|
||||
// ---------- alerts (set to "Once Per Bar") ----------
|
||||
goldNew = goldDir != 0 and nz(goldDir[1]) == 0
|
||||
|
||||
Reference in new issue
Block a user