Masterpiece of PineCoders script https://www.tradingview.com/script/dYqL95JB-Backtesting-Trading-Engine-PineCoders/ in v3, this is the project to upgrade it to v4-v5 and implement dynamic variable alerts message from within an indicator() alertcondition as discussed here https://t.me/pinescripters/31982
// ————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
// ——————————————————————————————————————————————— 15. Alerts —————————————————————————————————————————————————————————————
// ————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
// If your alerts are sent to an execution bot, then you will need to include the proper encoding in the message field.
A1 = AlertType1 and LongEntryTrigger and not PyramidLongEntry
A2 = AlertType2 and LongEntryTrigger and PyramidLongEntry
A3 = AlertType3 and ShortEntryTrigger and not PyramidShortEntry
A4 = AlertType4 and ShortEntryTrigger and PyramidShortEntry
A5 = AlertType5 and LongExitTrigger
A6 = AlertType6 and ShortExitTrigger
A7 = AlertType7 and EventType1Trigger
A8 = AlertType8 and EventType2Trigger
A9 = AlertType9 and EventType3Trigger
A10 = AlertType10 and EventType4Trigger
alertcondition(A1 or A2 or A3 or A4 or A5 or A6 or A7 or A8 or A9 or A10, title=SystemName, message=TradeId)
dynamic variable alerts message from within an indicator() alertcondition
https://github.com/f-cksociety/backtesting-trading-engine-pinecoders/blob/main/study-dynamic-variable-alert.pine
[backtesting-trading-engine-pinecoders] bte.pine (Lines 329-341)
Open in IDE · Open on GitHub [backtesting-trading-engine-pinecoders] bte.pine (Lines 1839-1854)
Open in IDE · Open on GitHub
Created from VS Code using CodeStream