trade-analyzer / scratch /testTelegramEntry.js
Aditya4573's picture
fix: escape & in Telegram close message; net commission into P&L
93af93c
Raw
History Blame Contribute Delete
1.09 kB
import dotenv from 'dotenv';
dotenv.config();
import { sendTelegramMessage } from './src/data/telegramNotifier.js';
const mockTradeMsg = `🚨 <b>NEW AUTOPILOT TRADE EXECUTED</b>\n\n` +
`<b>Setup Quality:</b> <code>Grade B Setup</code>\n` +
`<b>Symbol:</b> <code>GBPUSD</code>\n` +
`<b>Direction:</b> <code>LONG</code>\n` +
`<b>Lot Size:</b> <code>0.20 lots</code>\n` +
`<b>Entry Price:</b> <code>$1.34797</code>\n` +
`<b>Stop Loss (SL):</b> <code>$1.34543</code>\n` +
`<b>Take Profit 1 (TP1):</b> <code>$1.35306</code>\n` +
`<b>Take Profit 2 (TP2):</b> <code>$1.35560</code>\n\n` +
`πŸ“Š <b>Risk Configuration:</b>\n` +
`β€’ <b>Expected Risk:</b> <code>$50.87</code> (FundingPips Compliant)\n` +
`β€’ <b>Stop Loss Distance:</b> <code>0.00254 price units</code>\n\n` +
`πŸ’‘ <b>Trade Confluences Scanned:</b>\n` +
`β€’ Price at S/D Zone\n` +
`β€’ Trend aligned (bullish)\n` +
`β€’ Price near EMA21 support`;
async function run() {
console.log('Sending mock trade entry message...');
await sendTelegramMessage(mockTradeMsg);
console.log('Done.');
}
run();