Ating for MQL5
Loading...
Searching...
No Matches
SectionTime Class Reference

Manages the start and end times for a section. More...

Public Types

enum  ENUM_CHECK_SECTION_TIME { CHECK_ARG_SECTION_TIME_PASSED , ERR_START_EQUAL_END , ERR_CURRENT_OVER_END }
 Enum to handle different types of section time checks. More...
 

Public Member Functions

void UpdateAtr (uchar start_time_hour, uchar start_time_min, uchar start_time_seg, uchar end_time_hour, uchar end_time_min, uchar end_time_seg)
 Updates the section's start and end times.
 
ENUM_CHECK_SECTION_TIME CheckArg ()
 Checks the validity of the section time arguments.
 
void Update ()
 Updates the section's DateTime structures with current values.
 
bool VerifyInsideSection ()
 Verifies if the current time is within the section's start and end times.
 
string EnumCheckSectionTimeToString (ENUM_CHECK_SECTION_TIME enum_result)
 Converts the ENUM_CHECK_SECTION_TIME result to a string.
 
string CommentToShow ()
 Returns a formatted comment with section time information.
 

Public Attributes

MqlDateTime startDateTime
 
MqlDateTime endDateTime
 
MqlDateTime brokerDateTime
 DateTime structures for start, end, and broker times.
 

Detailed Description

Manages the start and end times for a section.

Member Enumeration Documentation

◆ ENUM_CHECK_SECTION_TIME

Enum to handle different types of section time checks.

Enumerator
CHECK_ARG_SECTION_TIME_PASSED 

Check if the section time has passed.

ERR_START_EQUAL_END 

Error: Start time is equal to end time.

ERR_CURRENT_OVER_END 

Error: Current time is over end time.

Constructor & Destructor Documentation

◆ SectionTime()

SectionTime::SectionTime ( void )
inline

◆ ~SectionTime()

SectionTime::~SectionTime ( void )
inline

Member Function Documentation

◆ CheckArg()

SectionTime::ENUM_CHECK_SECTION_TIME SectionTime::CheckArg ( )

Checks the validity of the section time arguments.

Returns
The result of the check as ENUM_CHECK_SECTION_TIME
+ Here is the call graph for this function:

◆ CommentToShow()

string SectionTime::CommentToShow ( )

Returns a formatted comment with section time information.

Returns
A string with the section time details

◆ EnumCheckSectionTimeToString()

string SectionTime::EnumCheckSectionTimeToString ( ENUM_CHECK_SECTION_TIME enum_result)

Converts the ENUM_CHECK_SECTION_TIME result to a string.

Parameters
enum_resultThe ENUM_CHECK_SECTION_TIME result to convert
Returns
A string representation of the enum result

◆ Update()

void SectionTime::Update ( )

Updates the section's DateTime structures with current values.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateAtr()

void SectionTime::UpdateAtr ( uchar start_time_hour,
uchar start_time_min,
uchar start_time_seg,
uchar end_time_hour,
uchar end_time_min,
uchar end_time_seg )

Updates the section's start and end times.

Parameters
start_time_hourStart time hour
start_time_minStart time minute
start_time_segStart time second
end_time_hourEnd time hour
end_time_minEnd time minute
end_time_segEnd time second

◆ VerifyInsideSection()

bool SectionTime::VerifyInsideSection ( )

Verifies if the current time is within the section's start and end times.

Returns
True if the current time is within the section, otherwise false
+ Here is the call graph for this function:

Member Data Documentation

◆ brokerDateTime

MqlDateTime SectionTime::brokerDateTime

DateTime structures for start, end, and broker times.

◆ endDateTime

MqlDateTime SectionTime::endDateTime

◆ startDateTime

MqlDateTime SectionTime::startDateTime

The documentation for this class was generated from the following file: