MT4 Floating Charts Extension API
Access and/or extend MT4 Floating Charts functionality
|
Class to interface with MT4 Floating Charts. More...
Public Member Functions | |
FloatingCharts (void) | |
Constructor. More... | |
int | Init (void) |
Initialize non-constant members. More... | |
int | Float (long chart_id) const |
Float a single chart. More... | |
int | FloatAll (void) const |
Float all docked charts except for the currently active chart. More... | |
int | Unfloat (long chart_id) const |
Unfloat a single chart. More... | |
int | UnfloatAll (void) const |
Unfloat all floating charts. More... | |
int | CornerSnap (long chart_id, int corner) const |
Snap a floating chart to a screen corner. More... | |
int | PushBack (long chart_id) const |
Push a floating chart behind all windows. More... | |
int | ShowChartsSameSymbol (long chart_id) const |
Bring all floating charts with the same symbol as the given chart forward. More... | |
int | StackChartsSameSymbol (long chart_id) const |
Stack all floating charts with the same symbol as the given chart. More... | |
bool | IsFCRunning (void) const |
Check if MT4 Floating Charts is running. More... | |
int | WaitForFC (uint timeout) const |
Wait for MT4 Floating Charts to attach to MetaTrader. More... | |
bool | IsChartFloating (long chart_id) const |
Check if a chart is floating. More... | |
string | GetFCVersionString (void) const |
Get MT4 Floating Charts version as a string. More... | |
string | GetAPIVersionString (void) const |
Get the FloatingCharts API version as a string. More... | |
bool | RequiresFC (int major, int minor, int patch, bool do_alert) const |
Check if MT4 Floating Charts meets the minimum version requirement. More... | |
Class to interface with MT4 Floating Charts.
FloatingCharts::FloatingCharts | ( | void | ) |
Constructor.
Initializes constants and calls Init().
int FloatingCharts::CornerSnap | ( | long | chart_id, |
int | corner | ||
) | const |
Snap a floating chart to a screen corner.
Corresponds to the custom toolbar buttons 1,2,3,4.
long | chart_id - chart id. 0 means the current chart. Applies only to undocked (floating) charts. |
int | corner - screen corner to snap to. Valid values are 0-3. |
int FloatingCharts::Float | ( | long | chart_id | ) | const |
Float a single chart.
long | chart_id - chart id. 0 means current chart. Applies only to docked charts. |
int FloatingCharts::FloatAll | ( | void | ) | const |
Float all docked charts except for the currently active chart.
string FloatingCharts::GetAPIVersionString | ( | void | ) | const |
Get the FloatingCharts API version as a string.
string FloatingCharts::GetFCVersionString | ( | void | ) | const |
Get MT4 Floating Charts version as a string.
int FloatingCharts::Init | ( | void | ) |
Initialize non-constant members.
bool FloatingCharts::IsChartFloating | ( | long | chart_id | ) | const |
Check if a chart is floating.
long | chart_id - chart id. 0 means the current chart. |
bool FloatingCharts::IsFCRunning | ( | void | ) | const |
Check if MT4 Floating Charts is running.
int FloatingCharts::PushBack | ( | long | chart_id | ) | const |
Push a floating chart behind all windows.
Corresponds to the custom toolbar button 'PB'.
long | chart_id - chart id. 0 means the current chart. Applies only to undocked (floating) charts. |
bool FloatingCharts::RequiresFC | ( | int | major, |
int | minor, | ||
int | patch, | ||
bool | do_alert | ||
) | const |
Check if MT4 Floating Charts meets the minimum version requirement.
If the minimum version is less than 3.2.0, the return value will always be true regardless of what version of FC is actually running.
int | major - major part of version number (e.g., 3 in 3.4.5). |
int | minor - minor part of version number (e.g., 4 in 3.4.5). |
int | patch - patch part of version (e.g., 5 in 3.4.5). |
bool | do_alert - if true, a standard alert is shown if the minimum version requirement is not met. |
int FloatingCharts::ShowChartsSameSymbol | ( | long | chart_id | ) | const |
Bring all floating charts with the same symbol as the given chart forward.
Corresponds to the custom toolbar button 'S*'.
long | chart_id - chart id. 0 means the current chart. Applies only to undocked (floating) charts. |
int FloatingCharts::StackChartsSameSymbol | ( | long | chart_id | ) | const |
Stack all floating charts with the same symbol as the given chart.
Corresponds to the custom toolbar button '[S]'.
long | chart_id - chart id. 0 means the current chart. Applies only to undocked (floating) charts. |
int FloatingCharts::Unfloat | ( | long | chart_id | ) | const |
Unfloat a single chart.
long | chart_id - chart id. 0 means current chart. Applies only to undocked (floating) charts. |
int FloatingCharts::UnfloatAll | ( | void | ) | const |
Unfloat all floating charts.
int FloatingCharts::WaitForFC | ( | uint | timeout | ) | const |
Wait for MT4 Floating Charts to attach to MetaTrader.
Does not return until either MT4 Floating Charts is detected or the timeout is reached.
uint | timeout - timeout in milliseconds. 0 means no timeout. |