This class allows to handle the cursor hover and pressing the free form button.
The button is implemented using the standard OBJ_BITMAP_LABEL object. Images should be set for four button states (normal, hovered, pressed, hovered pressed). The button shape is determined by analyzing the default state image (normal button). A set of free form regions on an image with non-zero transparency is treated as a button. The button shape can be as complex as possible. The implementation works correctly for any anchor corner (OBJPROP_CORNER) and any chart subwindow.
Standard Library is required for compilation.
The archive contains the button class and 3 examples:
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/12638
This class is designed for creating interactive buttons with various states on a price chart.Ozymandias_HTF
The Ozymandias indicator with the timeframe selection option available in the input parameters.