Yes, definitely.
Instead of printing values in the Experts log, you can display them directly on the MT5 chart using the built-in Comment() function.
The Comment() function creates a live information panel in the top-left corner of the chart and automatically updates every time your EA executes.
You can display almost any information, such as: Trend Direction, Current Position, Entry Price, Stop Loss, Target Price, Current Profit/Loss, etc…
A simple example is shown below:
Comment(
"Trend : ", trend, "\n",
"Entry Price : ", entryPrice, "\n",
"Stop Loss : ", stopLoss, "\n",
"Target : ", targetPrice, "\n",
"Current Profit : ", currentProfit, "\n",
"ATR : ", atrValue, "\n",
"EMA Fast : ", emaFast, "\n",
"EMA Slow : ", emaSlow
);
Place this code near the end of your OnTick() function (or wherever your strategy updates its values).
Every time a new tick arrives, the displayed information will refresh automatically, giving you a live dashboard of your strategy.
This approach is much cleaner than continuously checking the Experts log and is commonly used while developing and debugging MT5 Expert Advisors.