|
Ating for MQL5
|
Class to calculate price limits within a specific time range for a given symbol and timeframe. More...
Collaboration diagram for LimitsByTimeRange:Classes | |
| struct | Prices |
| Structure to store the upper and lower price limits along with their datetimes. More... | |
| struct | TimeRange |
| Structure to store the start and end datetime for the time range. More... | |
Public Types | |
| enum | ENUM_CHECK { PASSED , START_EQUAL_END , START_OVER_END , INCORRECT_FORMATTING , RATES_NO_FOUND } |
| Enumeration for different check results. More... | |
Public Member Functions | |
| LimitsByTimeRange () | |
| Default constructor for the LimitsByTimeRange class. | |
| void | UpdateAtr (uchar prev_start_hour, uchar prev_start_min, uchar prev_start_sec, uchar prev_end_hour, uchar prev_end_min, uchar prev_end_sec, ENUM_TIMEFRAMES timeframes_arg, string symbol_arg) |
| Updates the attributes of the class. | |
| Prices | GetPricesStruct () |
| Retrieves the structure containing calculated price limits. | |
| TimeRange | GetTimeRangeStruct () |
| Retrieves the structure containing the time range used for calculations. | |
| ENUM_CHECK | CheckArg () |
| Checks the validity of the arguments for time range calculations. | |
| string | EnumCheckToString (ENUM_CHECK enum_result) |
| Converts the ENUM_CHECK result to a human-readable string. | |
| TimeRange | GetTimeRange () |
| Calculates the time range based on the current and previous datetime settings. | |
| Prices | Get () |
| Retrieves the price limits within the specified time range. | |
Protected Member Functions | |
| void | Update () |
| Updates the start and end datetimes based on the previously set time parameters. | |
Protected Attributes | |
| uchar | previous_start_hour |
| Previous start hour. | |
| uchar | previous_start_min |
| Previous start minute. | |
| uchar | previous_start_sec |
| Previous start second. | |
| uchar | previous_end_hour |
| Previous end hour. | |
| uchar | previous_end_min |
| Previous end minute. | |
| uchar | previous_end_sec |
| Previous end second. | |
| ENUM_TIMEFRAMES | timeframes |
| Timeframe for the symbol. | |
| string | symbol |
| Trading symbol. | |
| MqlDateTime | start_datetime |
| Start datetime for the calculation. | |
| MqlDateTime | end_datetime |
| End datetime for the calculation. | |
| MqlDateTime | dt |
| Current datetime. | |
| MqlRates | rates_limits [] |
| Array to store rates within the time range. | |
| TimeRange | time_range |
| Time range for the calculation. | |
| Prices | prices |
| Prices structure to hold calculated limits. | |
Class to calculate price limits within a specific time range for a given symbol and timeframe.
Enumeration for different check results.
|
inline |
Default constructor for the LimitsByTimeRange class.
| LimitsByTimeRange::ENUM_CHECK LimitsByTimeRange::CheckArg | ( | ) |
Checks the validity of the arguments for time range calculations.
Here is the call graph for this function:| string LimitsByTimeRange::EnumCheckToString | ( | ENUM_CHECK | enum_result | ) |
Converts the ENUM_CHECK result to a human-readable string.
| enum_result | ENUM_CHECK result |
| LimitsByTimeRange::Prices LimitsByTimeRange::Get | ( | ) |
Retrieves the price limits within the specified time range.
Here is the call graph for this function:
|
inline |
Retrieves the structure containing calculated price limits.
| LimitsByTimeRange::TimeRange LimitsByTimeRange::GetTimeRange | ( | ) |
Calculates the time range based on the current and previous datetime settings.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Retrieves the structure containing the time range used for calculations.
|
protected |
Updates the start and end datetimes based on the previously set time parameters.
Here is the caller graph for this function:| void LimitsByTimeRange::UpdateAtr | ( | uchar | prev_start_hour, |
| uchar | prev_start_min, | ||
| uchar | prev_start_sec, | ||
| uchar | prev_end_hour, | ||
| uchar | prev_end_min, | ||
| uchar | prev_end_sec, | ||
| ENUM_TIMEFRAMES | timeframes_arg, | ||
| string | symbol_arg ) |
Updates the attributes of the class.
| prev_start_hour | Previous start hour |
| prev_start_min | Previous start minute |
| prev_start_sec | Previous start second |
| prev_end_hour | Previous end hour |
| prev_end_min | Previous end minute |
| prev_end_sec | Previous end second |
| timeframes_arg | Timeframe for the symbol |
| symbol_arg | Trading symbol |
|
protected |
Current datetime.
|
protected |
End datetime for the calculation.
|
protected |
Previous end hour.
|
protected |
Previous end minute.
|
protected |
Previous end second.
|
protected |
Previous start hour.
|
protected |
Previous start minute.
|
protected |
Previous start second.
|
protected |
Array to store rates within the time range.
|
protected |
Start datetime for the calculation.
|
protected |
Trading symbol.
|
protected |
Time range for the calculation.
|
protected |
Timeframe for the symbol.