ATS Scalping Cost Map
- Indicators
-
Andrea Michelon
Andrea (Andy), Italy. Self-taught programmer since the 1990s, now building MetaTrader 5 tools under the name Andy Trading Solutions (ATS). - Version: 1.0
ATS Scalping Cost Map shows, hour by hour, how much one round trip (opening and closing one trade) costs on your symbol compared with how far price usually moves in 15 minutes during that hour. It uses your broker's own 1-minute history and shows the result on a 24-hour dial.
Short-term trading pays the spread and the commission on every trade. The same cost can be small at one hour and large at another, because the market moves much more in some sessions than in others. This indicator measures it.
What it measures
- For each server hour (0 to 23): the median spread stored by your broker in the 1-minute bars of that hour (bars with spread 0 are left out), plus the commission you enter.
- The typical move of that hour: the median high-low range of complete 15-minute blocks (15 one-minute bars in the same quarter of the hour; incomplete blocks such as openings and breaks are left out).
- Cost of the hour = (median spread + commission) divided by the median 15-minute range, in percent.
- An hour is shown in grey when there is not enough data for it, or when neither a spread nor a commission is available.
What you see
- A 24-hour dial, coloured from the lowest-cost hours (green) to the highest-cost hours (red) of this symbol. The colours rank the hours of the symbol against each other, so an extreme hour such as the daily rollover does not hide the differences between the others.
- A needle on the current server hour and a "COST NOW" counter: live spread plus commission, divided by the median 15-minute range of this hour. It shows "NO RECENT TICKS" when no tick arrived in the last 10 minutes.
- A plate with the three lowest-cost and the three highest-cost hours.
- The symbol, the days of history used and the note "past costs, not a forecast - no signals, no orders".
Notes
- The indicator never opens, modifies or closes an order. It gives no buy or sell signals and does not time entries or exits. It only describes costs in the past.
- Hours are server hours as they are. When daylight saving time changes, the same session can fall on two different hours within the period measured.
- On accounts with raw spreads and a separate commission, the spread can be close to zero and the commission is most of the cost: enter your commission per lot, for a round trip, in the account currency. Two of the screenshots (EURUSD and GBPUSD) use a commission of 7 per lot on a raw-spread account, and some screenshots use more days of history than the default.
- The history used is limited by the "Max bars in chart" setting of the terminal (menu Tools, Options, Charts tab).
- Around the daily rollover (often the first server hour) spreads widen while price moves little, so those hours can show costs above 100%. This is what the broker's data shows, not an error. The "COST NOW" counter shows ">99" for these values; the plate shows the full figure.
- The full calculation runs at start and again every 24 hours; the commission is converted again every hour.
Settings
Commission per lot (round trip, account currency; 0 = none), days of history (10 to 1000, default 120), minimum days for an hour to be shown (default 20), dashboard size (0.6 to 1.2) and position.
Works on any symbol that has 1-minute history, on any chart timeframe; the statistics always use 1-minute bars.
Andy Trading Solutions
