Home Technical Indicator Post

Time To Close v1.01: Your Essential MT5 Indicator for Real-Time Trading

Attachments
56559.zip (2.46 KB, Download 0 times)

Time To Close MT5

TimeToClose-v1.01 is a must-have chart indicator that provides a real-time countdown to candle close, seamlessly integrating with your chart’s visuals. I aimed to keep it straightforward while ensuring it’s ready to roll right out of the box. Here’s what you can expect:

  • Dynamic Color Adaptation: The text color automatically adjusts based on your chart theme, whether it’s the candle border or body color, keeping everything visually cohesive.
  • Strategy Tester Optimization: Leveraging MQL_VISUAL_MODE detection, this feature disables rendering during non-visual back-tests via the EnableTextInVisualBacktest setting, helping to save on system resources while optimizing your strategies.
  • Multi-Timeframe Support: It automatically tweaks the display format using PeriodSeconds() calculations for all timeframes, from 1-minute up to monthly.
  • Customizable Display: You can tweak settings such as:
    - TextFirstSeparator/TextSecondSeparator for spacing
    - FontSize and TextAnchorPoint for positioning
    - An optional DateTime display through ShowTimeDate parameter, which is off by default.

This indicator utilizes EventSetMillisecondTimer(1000) for precise 1-second updates while keeping CPU usage low through OnCalculate() optimizations. Visual elements are automatically cleared during EA shutdown and refreshed when you change parameters.

How to Get Started:

  1. Download the indicator.
  2. Compile it in MetaEditor5.
  3. Run it and watch the magic happen!

Example in Black and White:

Colour Example:

If you come across any bugs or have ideas for optimization, or simply find this tool helpful, I’d love to hear from you. Happy trading!

Related Posts

Comments (0)