The Ultimate 1 Minute Forex Scalping Strategy: ALMA Indicator Explained
Re: The Ultimate 1 Minute Forex Scalping Strategy: ALMA Indicator Explained
To bring the entire "Pro" architecture into TradingView, we must creatively handle how Pine Script processes complex order management.
Unlike MQL, where you modify tickets dynamically, Pine Script manages exits holistically on every bar. To achieve the Partial Profit + Breakeven + ALMA Trailing mechanics, the script uses two simultaneous strategy.exit() commands that dynamically update their stop-loss levels and cancel out once the partial target is hit.
A Note on the Max Spread Filter in TradingView
TradingView's backtesting engine uses historical OHLC data, which does not store historical bid/ask spread fluctuations. Because of this, a programmatic "Max Spread Filter" cannot be accurately backtested in Pine Script. To account for spread spikes (like the midnight rollover) in TradingView, you must:
Model the cost using the slippage and commission parameters in the strategy header.
Rely on the Session Filter to completely block trading during low-liquidity hours where those spread spikes occur.
Unlike MQL, where you modify tickets dynamically, Pine Script manages exits holistically on every bar. To achieve the Partial Profit + Breakeven + ALMA Trailing mechanics, the script uses two simultaneous strategy.exit() commands that dynamically update their stop-loss levels and cancel out once the partial target is hit.
A Note on the Max Spread Filter in TradingView
TradingView's backtesting engine uses historical OHLC data, which does not store historical bid/ask spread fluctuations. Because of this, a programmatic "Max Spread Filter" cannot be accurately backtested in Pine Script. To account for spread spikes (like the midnight rollover) in TradingView, you must:
Model the cost using the slippage and commission parameters in the strategy header.
Rely on the Session Filter to completely block trading during low-liquidity hours where those spread spikes occur.
Re: The Ultimate 1 Minute Forex Scalping Strategy: ALMA Indicator Explained
The Ultimate ALMA + MACD Scalper (Pine Script v5)
Code: Select all
//@version=5
strategy("ALMA Pro Scalper: Partial & Trail", overlay=true, initial_capital=10000,
default_qty_type=strategy.percent_of_equity, default_qty_value=2,
commission_type=strategy.commission.cash_per_order, commission_value=3, slippage=1,
max_labels_count=500, max_lines_count=500)
// ==========================================
// INPUT GROUPS & PARAMETERS
// ==========================================
var string G_ALMA = "ALMA Core Settings"
var string G_MACD = "MACD Momentum Filter"
var string G_FILTER = "Pro Filters (Session & Trend)"
var string G_RISK = "Risk, Partials & Trailing"
var string G_UI = "Visuals & HUD"
// ALMA Settings
almaLength = input.int(9, title="Window Size", group=G_ALMA)
almaOffset = input.float(0.85, title="Offset", step=0.05, group=G_ALMA)
almaSigma = input.int(6, title="Sigma", group=G_ALMA)
// MACD Settings
fastLength = input.int(12, title="Fast Length", group=G_MACD)
slowLength = input.int(26, title="Slow Length", group=G_MACD)
signalLength = input.int(9, title="Signal Length", group=G_MACD)
// Filters
useSession = input.bool(true, title="Enable Session Filter?", group=G_FILTER)
sessionTimes = input.session("0800-1700", title="Trading Session (Exchange Time)", group=G_FILTER)
useHtfEma = input.bool(true, title="Filter with 200 EMA?", group=G_FILTER)
// Risk & Management
atrLength = input.int(14, title="ATR Length", group=G_RISK)
slMultiplier = input.float(1.5, title="Initial SL ATR Multiplier", step=0.1, group=G_RISK)
partialRR = input.float(1.5, title="Partial Profit Target (in R)", step=0.1, group=G_RISK)
partialPct = input.float(50.0, title="Partial Close %", group=G_RISK)
moveToBE = input.bool(true, title="Move to Breakeven on Partial?", group=G_RISK)
trailBuffer = input.int(10, title="Trail Buffer behind ALMA (Ticks/Points)", group=G_RISK)
// Visuals
showHUD = input.bool(true, title="Show Dashboard Table?", group=G_UI)
colorCandles = input.bool(true, title="Color Candles by ALMA Trend?", group=G_UI)
// ==========================================
// INDICATOR CALCULATIONS
// ==========================================
almaLine = ta.alma(close, almaLength, almaOffset, almaSigma)
[macdLine, signalLine, histLine] = ta.macd(close, fastLength, slowLength, signalLength)
atr = ta.atr(atrLength)
ema200 = ta.ema(close, 200)
inSession = useSession ? not na(time(timeframe.period, sessionTimes)) : true
// ==========================================
// STATE VARIABLES FOR TRADE MANAGEMENT
// ==========================================
var float g_entry = na
var float g_sl = na
var float g_tp = na
var bool g_partial_done = false
// Reset state when flat
if strategy.position_size == 0
g_entry := na
g_sl := na
g_tp := na
g_partial_done := false
// Detect Partial Close (if position volume decreases but remains active)
if strategy.position_size > 0 and strategy.position_size[1] > 0 and strategy.position_size < strategy.position_size[1]
g_partial_done := true
if moveToBE
g_sl := math.max(g_sl, g_entry) // Shift SL to entry for Long
if strategy.position_size < 0 and strategy.position_size[1] < 0 and strategy.position_size > strategy.position_size[1]
g_partial_done := true
if moveToBE
g_sl := math.min(g_sl, g_entry) // Shift SL to entry for Short
// ==========================================
// ENTRY LOGIC
// ==========================================
longCross = ta.crossover(close, almaLine)
shortCross = ta.crossunder(close, almaLine)
longCond = longCross and (histLine > 0) and inSession and (useHtfEma ? close > ema200 : true)
shortCond = shortCross and (histLine < 0) and inSession and (useHtfEma ? close < ema200 : true)
if longCond and strategy.position_size == 0
g_entry := close
g_sl := close - (atr * slMultiplier)
risk = close - g_sl
g_tp := close + (risk * partialRR)
strategy.entry("Long", strategy.long)
if shortCond and strategy.position_size == 0
g_entry := close
g_sl := close + (atr * slMultiplier)
risk = g_sl - close
g_tp := close - (risk * partialRR)
strategy.entry("Short", strategy.short)
// ==========================================
// TRAILING SL LOGIC & EXIT EXECUTION
// ==========================================
if strategy.position_size > 0
// Trail SL behind ALMA
trail_level = almaLine - (trailBuffer * syminfo.mintick)
g_sl := math.max(g_sl, trail_level) // Never move stop downwards
// Execute Partials and Trails
if not g_partial_done
strategy.exit("TP1", "Long", qty_percent=partialPct, limit=g_tp, stop=g_sl)
strategy.exit("Trail", "Long", stop=g_sl)
if strategy.position_size < 0
// Trail SL behind ALMA
trail_level = almaLine + (trailBuffer * syminfo.mintick)
g_sl := math.min(g_sl, trail_level) // Never move stop upwards
// Execute Partials and Trails
if not g_partial_done
strategy.exit("TP1", "Short", qty_percent=partialPct, limit=g_tp, stop=g_sl)
strategy.exit("Trail", "Short", stop=g_sl)
// ==========================================
// VISUAL RENDERING
// ==========================================
almaColor = close > almaLine ? color.new(#00E676, 0) : color.new(#FF5252, 0)
plot(almaLine, color=almaColor, linewidth=2, title="ALMA")
plot(useHtfEma ? ema200 : na, color=color.new(color.white, 50), linewidth=1, title="200 EMA")
// Plot the dynamic Trailing Stop Loss line when in a trade
plot(strategy.position_size != 0 ? g_sl : na, color=color.new(color.fuchsia, 0), style=plot.style_stepline, linewidth=1, title="Active Stop Loss")
barcolor(colorCandles ? almaColor : na)
bgcolor(useSession and inSession ? color.new(color.blue, 95) : na, title="Trading Session")
// ==========================================
// DASHBOARD HUD
// ==========================================
if showHUD
var table hud = table.new(position.top_right, 2, 5, border_width = 1)
if barstate.islast
table.cell(hud, 0, 0, "Metric", text_color=color.white, bgcolor=color.gray)
table.cell(hud, 1, 0, "Value", text_color=color.white, bgcolor=color.gray)
table.cell(hud, 0, 1, "ALMA Trend", text_color=color.white, bgcolor=color.black)
table.cell(hud, 1, 1, close > almaLine ? "BULLISH" : "BEARISH", text_color=close > almaLine ? color.green : color.red, bgcolor=color.black)
table.cell(hud, 0, 2, "Session Status", text_color=color.white, bgcolor=color.black)
table.cell(hud, 1, 2, inSession ? "ACTIVE" : "CLOSED", text_color=inSession ? color.green : color.red, bgcolor=color.black)
table.cell(hud, 0, 3, "Volatility (ATR)", text_color=color.white, bgcolor=color.black)
table.cell(hud, 1, 3, str.tostring(atr, "#.#####"), text_color=color.yellow, bgcolor=color.black)
table.cell(hud, 0, 4, "Trade State", text_color=color.white, bgcolor=color.black)
tradeStateText = strategy.position_size == 0 ? "FLAT" : (g_partial_done ? "TRAILING (BE)" : "INITIAL RISK")
tradeStateColor = strategy.position_size == 0 ? color.gray : (g_partial_done ? color.fuchsia : color.orange)
table.cell(hud, 1, 4, tradeStateText, text_color=tradeStateColor, bgcolor=color.black)Re: The Ultimate 1 Minute Forex Scalping Strategy: ALMA Indicator Explained
How the Dual-Exit Engine Works
When a trade opens, the script submits two distinct exit orders simultaneously:
TP1: Has a limit order (your 1.5R target) and a stop order (the dynamic ALMA trail), strictly assigned to 50% of your initial volume.
Trail: Has ONLY a stop order (the exact same dynamic ALMA trail), assigned to the remaining 50%.
If the stop loss gets hunted before the target is reached, both exits trigger instantly and 100% of the trade is closed. If your 1.5R target is hit, TP1 cashes out 50%. On the very next bar, the script detects the volume drop, flips the g_partial_done switch, yanks the stop loss to breakeven, and silently cancels the TP1 order—leaving only the Trail order ruthlessly tracking the ALMA line until the momentum finally dies.
When a trade opens, the script submits two distinct exit orders simultaneously:
TP1: Has a limit order (your 1.5R target) and a stop order (the dynamic ALMA trail), strictly assigned to 50% of your initial volume.
Trail: Has ONLY a stop order (the exact same dynamic ALMA trail), assigned to the remaining 50%.
If the stop loss gets hunted before the target is reached, both exits trigger instantly and 100% of the trade is closed. If your 1.5R target is hit, TP1 cashes out 50%. On the very next bar, the script detects the volume drop, flips the g_partial_done switch, yanks the stop loss to breakeven, and silently cancels the TP1 order—leaving only the Trail order ruthlessly tracking the ALMA line until the momentum finally dies.
Re: The Ultimate 1 Minute Forex Scalping Strategy: ALMA Indicator Explained
Migrating this logic to cTrader is incredibly efficient because C# handles position states and asynchronous modifications much more cleanly than MQL. In the cAlgo API, you don't need to loop through tickets to execute a partial close—you simply call ClosePosition(position, volumeToClose).
To manage the partial targets, this cBot uses a C# Dictionary to memorize the 1.5R target price for every new position ID the moment it opens. When the bid/ask crosses that price, it cashes out the designated percentage, drops the target from memory, shifts the stop to breakeven, and lets the ALMA trailing logic take over the rest.
To manage the partial targets, this cBot uses a C# Dictionary to memorize the 1.5R target price for every new position ID the moment it opens. When the bid/ask crosses that price, it cashes out the designated percentage, drops the target from memory, shifts the stop to breakeven, and lets the ALMA trailing logic take over the rest.
Re: The Ultimate 1 Minute Forex Scalping Strategy: ALMA Indicator Explained
The ALMA + MACD Pro Scalper (cTrader / C#)
Open cTrader Automate, create a new cBot, and paste this C# code.
Open cTrader Automate, create a new cBot, and paste this C# code.
Code: Select all
using System;
using System.Collections.Generic;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
namespace cAlgo.Robots
{
[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class ALMA_Pro_Scalper : Robot
{
// ==========================================
// PARAMETERS
// ==========================================
[Parameter("ALMA Window Size", Group = "ALMA", DefaultValue = 9)]
public int AlmaLength { get; set; }
[Parameter("ALMA Offset", Group = "ALMA", DefaultValue = 0.85, MinValue = 0, MaxValue = 1)]
public double AlmaOffset { get; set; }
[Parameter("ALMA Sigma", Group = "ALMA", DefaultValue = 6.0)]
public double AlmaSigma { get; set; }
[Parameter("MACD Fast", Group = "MACD", DefaultValue = 12)]
public int MacdFast { get; set; }
[Parameter("MACD Slow", Group = "MACD", DefaultValue = 26)]
public int MacdSlow { get; set; }
[Parameter("MACD Signal", Group = "MACD", DefaultValue = 9)]
public int MacdSignal { get; set; }
[Parameter("ATR Period", Group = "Risk Management", DefaultValue = 14)]
public int AtrPeriod { get; set; }
[Parameter("Initial SL (ATR Multiplier)", Group = "Risk Management", DefaultValue = 1.5)]
public double SlAtrMultiplier { get; set; }
[Parameter("Partial Target (in R)", Group = "Risk Management", DefaultValue = 1.5)]
public double PartialRR { get; set; }
[Parameter("Partial Close %", Group = "Risk Management", DefaultValue = 50.0)]
public double PartialPct { get; set; }
[Parameter("Move to Breakeven?", Group = "Risk Management", DefaultValue = true)]
public bool MoveToBE { get; set; }
[Parameter("Trail Buffer (Pips)", Group = "Risk Management", DefaultValue = 1.0)]
public double TrailBufferPips { get; set; }
[Parameter("Max Spread (Pips)", Group = "Filters", DefaultValue = 1.5)]
public double MaxSpreadPips { get; set; }
[Parameter("Trading Session (UTC)", Group = "Filters", DefaultValue = "08:00-17:00")]
public string SessionHours { get; set; }
[Parameter("Trade Volume (Units)", Group = "Execution", DefaultValue = 100000)]
public double LotVolume { get; set; }
// ==========================================
// STATE & INDICATORS
// ==========================================
private MacdCross _macd;
private AverageTrueRange _atr;
private Dictionary<int, double> _partialTargets = new Dictionary<int, double>();
private TimeSpan _sessionStart;
private TimeSpan _sessionEnd;
private const string BotLabel = "ALMA Pro";
protected override void OnStart()
{
// Note: cTrader MacdCross takes (Long, Short, Signal)
_macd = Indicators.MacdCross(Bars.ClosePrices, MacdSlow, MacdFast, MacdSignal);
_atr = Indicators.AverageTrueRange(Bars, AtrPeriod, MovingAverageType.Simple);
string[] hours = SessionHours.Split('-');
_sessionStart = TimeSpan.Parse(hours[0]);
_sessionEnd = TimeSpan.Parse(hours[1]);
}
protected override void OnPositionOpened(PositionOpenedEventArgs args)
{
var pos = args.Position;
if (pos.SymbolName == SymbolName && pos.Label == BotLabel)
{
// Memorize the exact absolute price for the 1.5R partial target
if (pos.StopLoss.HasValue)
{
double risk = Math.Abs(pos.EntryPrice - pos.StopLoss.Value);
double target = pos.TradeType == TradeType.Buy
? pos.EntryPrice + (risk * PartialRR)
: pos.EntryPrice - (risk * PartialRR);
_partialTargets[pos.Id] = target;
}
}
}
protected override void OnPositionClosed(PositionClosedEventArgs args)
{
// Clean up memory if position is fully closed (e.g., SL hit before partial)
_partialTargets.Remove(args.Position.Id);
}
protected override void OnTick()
{
double currentAlma = CalculateALMA(1, AlmaLength, AlmaOffset, AlmaSigma);
if (currentAlma == 0) return;
foreach (var pos in Positions.FindAll(BotLabel, SymbolName))
{
// 1. Manage ALMA Trailing Stop
if (pos.TradeType == TradeType.Buy)
{
double newSl = currentAlma - (TrailBufferPips * Symbol.PipSize);
if (newSl > (pos.StopLoss ?? 0) && newSl < Symbol.Bid)
{
ModifyPosition(pos, Math.Round(newSl, Symbol.Digits), pos.TakeProfit);
}
}
else if (pos.TradeType == TradeType.Sell)
{
double newSl = currentAlma + (TrailBufferPips * Symbol.PipSize);
if ((newSl < (pos.StopLoss ?? double.MaxValue)) && newSl > Symbol.Ask)
{
ModifyPosition(pos, Math.Round(newSl, Symbol.Digits), pos.TakeProfit);
}
}
// 2. Manage Partial Closes
if (_partialTargets.ContainsKey(pos.Id))
{
double targetPrice = _partialTargets[pos.Id];
bool targetHit = pos.TradeType == TradeType.Buy ? Symbol.Bid >= targetPrice : Symbol.Ask <= targetPrice;
if (targetHit)
{
// Calculate standard volume to close based on broker step size
double targetVolume = pos.VolumeInUnits * (PartialPct / 100.0);
double closeVol = Symbol.NormalizeVolumeInUnits(targetVolume, RoundingMode.Down);
if (closeVol >= Symbol.VolumeInUnitsMin)
{
ClosePosition(pos, closeVol); // cTrader natively handles the partial close
}
_partialTargets.Remove(pos.Id); // Mark as done
if (MoveToBE)
{
ModifyPosition(pos, pos.EntryPrice, pos.TakeProfit);
}
}
}
}
}
protected override void OnBarClosed()
{
// Ensure we only have one position open at a time
if (Positions.FindAll(BotLabel, SymbolName).Length > 0) return;
// Session Filter
TimeSpan now = Server.Time.TimeOfDay;
bool inSession = (_sessionStart <= _sessionEnd)
? (now >= _sessionStart && now <= _sessionEnd)
: (now >= _sessionStart || now <= _sessionEnd);
if (!inSession) return;
// Max Spread Filter
double spreadPips = Symbol.Spread / Symbol.PipSize;
if (spreadPips > MaxSpreadPips)
{
Print($"Spread ({spreadPips} pips) exceeds max allowance. Skipping ALMA cross.");
return;
}
double alma1 = CalculateALMA(1, AlmaLength, AlmaOffset, AlmaSigma);
double alma2 = CalculateALMA(2, AlmaLength, AlmaOffset, AlmaSigma);
if (alma1 == 0 || alma2 == 0) return;
double close1 = Bars.ClosePrices.Last(1);
double close2 = Bars.ClosePrices.Last(2);
double hist1 = _macd.Histogram.Last(1);
bool longCross = (close1 > alma1 && close2 <= alma2);
bool shortCross = (close1 < alma1 && close2 >= alma2);
if (longCross && hist1 > 0)
{
double slPips = (_atr.Result.Last(1) * SlAtrMultiplier) / Symbol.PipSize;
ExecuteMarketOrder(TradeType.Buy, SymbolName, LotVolume, BotLabel, slPips, null);
}
else if (shortCross && hist1 < 0)
{
double slPips = (_atr.Result.Last(1) * SlAtrMultiplier) / Symbol.PipSize;
ExecuteMarketOrder(TradeType.Sell, SymbolName, LotVolume, BotLabel, slPips, null);
}
}
// Custom Gaussian Distribution ALMA Calculation
private double CalculateALMA(int shift, int length, double offset, double sigma)
{
double m = offset * (length - 1);
double s = length / sigma;
double wSum = 0.0;
double res = 0.0;
for (int i = 0; i < length; i++)
{
double w = Math.Exp(-(Math.Pow(i - m, 2)) / (2 * s * s));
res += Bars.ClosePrices.Last(shift + (length - 1 - i)) * w;
wSum += w;
}
return wSum > 0 ? res / wSum : 0.0;
}
}
}Re: The Ultimate 1 Minute Forex Scalping Strategy: ALMA Indicator Explained
To push external network requests in cTrader, you must first grant the cBot permission to bypass the sandbox, and then utilize the native cAlgo.API.Http module to fire off JSON payloads to the respective platform APIs.
Here are the specific modifications needed for the existing C# script.
1. Elevate Access Rights
By default, cTrader blocks all outbound HTTP requests for security. At the very top of your script, change the AccessRights from None to FullAccess.
Here are the specific modifications needed for the existing C# script.
1. Elevate Access Rights
By default, cTrader blocks all outbound HTTP requests for security. At the very top of your script, change the AccessRights from None to FullAccess.
Code: Select all
[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
public class ALMA_Pro_Scalper : RobotRe: The Ultimate 1 Minute Forex Scalping Strategy: ALMA Indicator Explained
2. Add the Webhook Inputs
Add these new parameters into your // PARAMETERS section so you can configure the URLs directly from the cTrader UI.
Add these new parameters into your // PARAMETERS section so you can configure the URLs directly from the cTrader UI.
Code: Select all
[Parameter("Enable Discord Alerts", Group = "Webhooks", DefaultValue = false)]
public bool EnableDiscord { get; set; }
[Parameter("Discord Webhook URL", Group = "Webhooks", DefaultValue = "")]
public string DiscordUrl { get; set; }
[Parameter("Enable Telegram Alerts", Group = "Webhooks", DefaultValue = false)]
public bool EnableTelegram { get; set; }
[Parameter("Telegram Bot Token", Group = "Webhooks", DefaultValue = "")]
public string TelegramToken { get; set; }
[Parameter("Telegram Chat ID", Group = "Webhooks", DefaultValue = "")]
public string TelegramChatId { get; set; }Re: The Ultimate 1 Minute Forex Scalping Strategy: ALMA Indicator Explained
3. Build the Payload Sender
Inject this new method anywhere inside your ALMA_Pro_Scalper class. It checks which services are enabled, builds the correct JSON string structure for that specific platform, and fires it asynchronously via Http.Post.
Inject this new method anywhere inside your ALMA_Pro_Scalper class. It checks which services are enabled, builds the correct JSON string structure for that specific platform, and fires it asynchronously via Http.Post.
Code: Select all
private void SendAlert(string message)
{
// Discord Integration
if (EnableDiscord && !string.IsNullOrEmpty(DiscordUrl))
{
try
{
// Discord expects a "content" key
string payload = $"{{\"content\": \"{message}\"}}";
Http.Post(DiscordUrl, payload, "application/json");
}
catch (Exception ex) { Print("Discord Webhook Error: " + ex.Message); }
}
// Telegram Integration
if (EnableTelegram && !string.IsNullOrEmpty(TelegramToken) && !string.IsNullOrEmpty(TelegramChatId))
{
try
{
string url = $"https://api.telegram.org/bot{TelegramToken}/sendMessage";
// Telegram expects "chat_id" and "text" keys
string payload = $"{{\"chat_id\": \"{TelegramChatId}\", \"text\": \"{message}\"}}";
Http.Post(url, payload, "application/json");
}
catch (Exception ex) { Print("Telegram Webhook Error: " + ex.Message); }
}
}Re: The Ultimate 1 Minute Forex Scalping Strategy: ALMA Indicator Explained
4. Trigger the Alert on Execution
Finally, locate your existing OnPositionOpened method and add the alert trigger at the bottom of the block. This will capture the entry details and fire the message the millisecond the broker confirms the fill.
Finally, locate your existing OnPositionOpened method and add the alert trigger at the bottom of the block. This will capture the entry details and fire the message the millisecond the broker confirms the fill.
Code: Select all
protected override void OnPositionOpened(PositionOpenedEventArgs args)
{
var pos = args.Position;
if (pos.SymbolName == SymbolName && pos.Label == BotLabel)
{
// ... (Keep your existing partial targets logic here) ...
// Build and send the alert
string direction = pos.TradeType == TradeType.Buy ? "LONG" : "SHORT";
string msg = $"🚨 **ALMA Scalper Executed**\\n" +
$"Symbol: {pos.SymbolName}\\n" +
$"Direction: {direction}\\n" +
$"Entry: {pos.EntryPrice}\\n" +
$"Initial SL: {pos.StopLoss}";
SendAlert(msg);
}
}Re: The Ultimate 1 Minute Forex Scalping Strategy: ALMA Indicator Explained
1.Generate the Discord URL: In your Discord server, go to Channel Settings > Integrations > Webhooks > New Webhook. Copy the generated URL and paste it into the cBot parameters.
2.Generate the Telegram Credentials:Message the @BotFather account on Telegram, type /newbot, and copy the HTTP API Token it provides.
3.Find your Telegram Chat ID: Send a message to your new bot, then visit [https://api.telegram.org/bot](https://api.telegram.org/bot)<YOUR_TOKEN>/getUpdates in a web browser. Locate the "chat":{"id":...} number in the raw JSON output and paste it into the cBot parameters.
2.Generate the Telegram Credentials:Message the @BotFather account on Telegram, type /newbot, and copy the HTTP API Token it provides.
3.Find your Telegram Chat ID: Send a message to your new bot, then visit [https://api.telegram.org/bot](https://api.telegram.org/bot)<YOUR_TOKEN>/getUpdates in a web browser. Locate the "chat":{"id":...} number in the raw JSON output and paste it into the cBot parameters.