Version 2.52 2026.03.13
//| CHANGELOG |
//| |
//| v2.52 Telegram 429 Rate-Limit protection for all send paths. |
//| ParseRetryAfter() reads retry_after from Telegram JSON. |
//| TgSend / Photo / Document: up to 3 retries on 429. |
//| TgBroadcast / TgSendScreenshot: 2500ms pause between |
//| consecutive chat IDs to prevent 429 preemptively. |
//| |
Version 2.51 2026.03.09
//| CHANGELOG |
//| |
//| v2.51 CalcPips renamed to Pts, label Pips -> Pts. |
//| Forex 5/3-digit: result in pips (div by pt*10). |
//| Metals/Crypto/Indices (<=2 digits): raw price diff, |
//| e.g. XAUUSD 50.32 pts instead of 5032.0 pips. |
//| Decimal places: 1 for forex, 2 for price-based. |
//| |
Version 2.50 2026.03.08
//| CHANGELOG |
//| |
//| v2.50 Separator line shortened from 20 to 14 characters. |
//| Prevents oversized divider lines in Telegram Topics |
//| and channels where message width is rendered wider. |
//| |
Version 2.49 2026.03.02
//| CHANGELOG |
//| |
//| v2.49 PostDailyReport net P/L fix: opening deal commission |
//| and swap now included, consistent with MsgClose net. |
//| HistorySelectByPosition used per closing deal to find |
//| the matching opening deal. Day history restored via |
//| HistorySelect(day_start, TimeCurrent()) after each call. |
//| win/loss classification also based on full net P/L. |
//| |
Version 2.48 2026.03.02
//| CHANGELOG |
//| |
//| v2.48 Partial close and Close By support. |
//| After DEAL_ENTRY_OUT, PositionSelectByTicket checks |
//| whether position still exists → remaining volume > 0 |
//| = partial close. Header changes to "🔄 PARTIAL CLOSE". |
//| Lots line shows: "0.01 closed / 0.02 remaining". |
//| ModifyCacheRemove only called on full close, not |
//| partial (position still active, may be modified again). |
//| DEAL_ENTRY_OUT_BY detected → header "🔄 CLOSE BY". |
//| MsgClose signature extended with is_close_by, |
//| is_partial, remaining_lots parameters. |
//| |
Version 2.47 2026.03.02
//| CHANGELOG |
//| |
//| v2.47 MsgClose Gross/Net split: brokers split commission |
//| between opening deal (-0.03) and closing deal (-0.03). |
//| Previously only closing deal commission was counted. |
//| Now opening deal DEAL_COMMISSION + DEAL_SWAP also added |
//| to net in the HistorySelectByPosition loop. |
//| Gross (pure price move) shown separately when costs |
//| exist (|gross - net| > 0.001). Net = true account P/L. |
//| Result emoji (✅/❌) based on net, not gross. |
//| |
Version 2.46 2026.02.26
//| CHANGELOG |
//| |
//| v2.46 MsgOpen direction fix: read from DEAL_TYPE of opening |
//| deal (DEAL_TYPE_BUY=opened BUY), not from unreliable |
//| HistoryOrderSelect which defaults to BUY on failure. |
//| MsgClose direction fix: was reading closing deal type |
//| (closing BUY → DEAL_TYPE_SELL → showed SELL). Now reads |
//| from opening deal in existing HistorySelectByPosition |
//| loop - same source as open_price and open_comment. |
//| AccountBlock fix: Balance now always shown; Equity only |
//| added when Fmt_ShowEquity=true. Previously Balance was |
//| hidden unless Fmt_ShowEquity was enabled. |
//| Removed duplicate //+---+ header before MsgModify. |
Version 2.45 2026.02.25
//| CHANGELOG |
//| |
//| v2.45 Modify cooldown timer (Ev_ModifyDelay input, default |
//| 60s). FlushPendingModifies() in OnTimer. EventSetTimer |
//| changed to 1s. Only one message per ticket per interval.|
//| |
//| v2.44 Per-ticket modify dedup via ModifyState struct array. |
//| Replaces single global g_last_sl/tp. Multiple positions |
//| modified simultaneously now handled independently. |
//| ModifyCacheRemove() cleans up on position close. |
//| |
//| v2.43 Direction (📊) added to MsgClose and MsgModify. |
//| Close: derived from is_buy flag already present. |
//| Modify: read from PositionSelectByTicket / OrderSelect. |
Version 2.42 2026.02.23
minor typing and layout improvements
Version 2.38 2026.02.23
closed trade comment updated
Version 2.37 2026.02.23
minor improvements
added trade comment
Version 2.32 2026.02.23
added
input bool Sc_DeleteAfterSend = true; // Delete screenshot file after sending
Version 2.31 2026.02.22
minor improvements