This is a lightweight, real-time custom indicator for MetaTrader 4 that displays key information about your open market trades on the current chart symbol. TPSproTrading created it and has been significantly enhanced with an autohide feature and major performance optimisations.
It gives you an instant, at-a-glance view of:
- How many trades are open
- Total floating pips
- Realised profit/loss (in money and %)
- Current spread
- Time left until the current bar closes
All data updates on every tick and is calculated **only for the symbol the indicator is attached to**.
1. Follow the price (default) โ Text object that moves with the price (like a dynamic label attached to the chart).
2. As comment โ Classic `Comment()` text in the top-left corner of the chart.
3. In selected corner โ Fixed label object anchored to any corner of the screen with full alignment control (left/centre/right + top/middle/bottom).
You can turn each item on/off individually:
-
-
-
-
-
-
All elements are concatenated intelligently with spaces or โ | โ separators.
Profit and pips are shown in profit colour (blue) or loss colour (red) automatically. When flat, it uses the neutral text colour.
- When zero trades are open on the current symbol โ the indicator completely disappears from the chart.
- No text object left behind
- No Comment() spam
- No visual clutter
- As soon as even one trade opens โ the indicator instantly reappears with full data.
This gives you a clean chart when youโre flat and automatic visibility the moment you enter the market.
- One single loop through `OrdersTotal()` instead of the original 3โ4 separate loops.
- All statistics (count + pips + profit) are now calculated together in the new `GetTradeStats()` function.
- Pip multiplier, tick size, and digits are pre-calculated once outside the loop.
- Removed redundant function calls, unused variables (`double n`), and unnecessary error checks on every tick.
- Cleaner object creation/update logic (no repeated `ObjectFind` + `ObjectCreate` overhead).
- Result: Dramatically lower CPU usage โ especially noticeable with many open trades or on slower terminals.
- `show_type`, `corner`, `h_align`, `v_align`
- `show_profit`, `show_perc`, `show_spread`, `show_time`, `show_trades_count`, `show_pips`
- Colours: `colortext`, `ecProfit`, `ecLoss`
- Positioning: `coord_y`, `indent`, `x_offset`, `y_offset`
- Font: `text_size`, `text_font`
- Works on any symbol (Forex, Indices, Metals, Crypto, etc.).
- Handles 4-digit and 5-digit brokers correctly.
- Pure MQL4 โ no DLLs, no external files.
- Zero errors/warnings on compile.
- Deinit cleanly removes all objects and comments.
In short:
ShowPips_Edit_AI is now a clean, ultra-light, intelligent dashboard that stays completely invisible when you have no positions and pops up instantly with rich, colour-coded information the moment you enter the market โ all while using minimal CPU resources.
Just attach it to any chart, choose your preferred display mode, and enjoy a clutter-free trading experience!
Beatle