← Назад к списку файлов

auto trading_v2.02.mq4

Поиск по коду файла

#property description "This utility allows you to automatically enable or disable the automated trading button ."
#property description "For assistance Email : info@forexlimerence.com Telegram : "
#property version     "2.02"
#property strict

#include <WinUser32.mqh>
#import "user32.dll"

int GetAncestor(int, int);
#define MT4_WMCMD_EXPERTS  33020 

#import

input int            Start_Time                 = 12;   //Start AutoTrade Time      
input int            Start_Min                  = 5;    //Start AutoTrade Minute      
input int            Finish_Time                = 2;    //Stop AutoTrade Time 
input int            Finish_Min                 = 50;   //Stop AutoTrade Time 
input bool           WaitForOrdersToBeClosed    = true; //Wait for orders to be closed before disabling Autotrading
input bool           TradeOnFriday              = false;//true to start AutoTrade on friday at Start_Time

int            start_Time;          
int            finish_Time;
int            start_Min;
int            finish_Min;
int            AbsoluteStartTime;
int            AbsoluteStopTime;

int OnInit()
{
      // код доступен только после оплаты
   }

void OnDeinit(const int reason)
  {

  } 

void OnTick()
{
      // код доступен только после оплаты
   }

void OnTimer()
{
   #define  Friday   5
   int main = GetAncestor(WindowHandle(Symbol(), Period()), 2/*GA_ROOT*/);

   int Current_Time = TimeHour(TimeLocal());
   int Current_Min = TimeMinute(TimeLocal());
   int Current_Day = TimeDay(TimeLocal());
   int AbsoluteTime = (Current_Time*100)+Current_Min;

   if (Current_Day != Friday || (Current_Day == Friday && TradeOnFriday)){
      if (AbsoluteStartTime >  AbsoluteStopTime) {
         if (AbsoluteT

Показано первые 50% кода (символов: 2937)

Как получить полную версию?

Введите ваш email и нажмите кнопку, чтобы перейти к оплате.