거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Facebook에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
조회수:
3424
평가:
(31)
게시됨:
2012.09.10 12:06
업데이트됨:
2016.11.22 07:32
이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

The function is used to determine weekends on a server. It will be especially useful to those who use OnTimer() function in their Expert Advisors for events handling. Using OnTimer() function on weekends (if the terminal is not closed for this period) may lead to sending multiple unnecessary trading requests wasting PC resources. 

DaysOfWeekCheck() function from the presented library has been implemented to prevent such course of events. To use this function, its checking algorithm must be placed at the very beginning of OnTimer() function body of the Expert Advisor code:

void OnTimer()
  {
//----
    if(!DayOfWeekCheck()) return;

The execution part of the Expert Advisor code must be placed after this weekends checking algorithm. Therefore, OnTimer() function activity will be limited at weekends, as it will not pass the check.

The function uses DaysOfWeekCheck.mqh library (should be copied in terminal_data_folder\MQL5\Include). The library contents should be placed into the developed code using #include directive before applying the function globally:

#include <DaysOfWeekCheck.mqh>

MetaQuotes Ltd에서 러시아어로 번역함.
원본 코드: https://www.mql5.com/ru/code/962

EAX_Mysql - MySQL library EAX_Mysql - MySQL library

This library allows an easy interface to MySQL.

ExtObjects ExtObjects

Dedicated functions to read and write object properties.

OpenBuyPosition OpenBuyPosition

The script is developed for buying with fixed Stop Loss and Take Profit values in points from the current price.

OpenSellPosition OpenSellPosition

The script is developed for selling with fixed Stop Loss and Take Profit values in points from the current price.