I need to ask some questions

To add comments, please log in or register
GrumpyDuckMan
882
GrumpyDuckMan  

Hello everyone,

My first question is in regards to #include <controls\dialog>

Q 1: Does EA continue, stop, or pause while dialog has focus?

Q 2: Does #define place a variable value on loading, or is it like a const variable? 

Q 3 How do I code access to  <controls\xxx.mph> ?


//+------------------------------------------------------------------+
//|                                                   Forum_Test.mq4 |
//|                        Copyright 2018, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+

#property copyright "Copyright 2018, MetaQuotes Software Corp."
#property link      "www.mql5.com/en/forum"
#property version   "1.00"
#property strict

#include "Variables.mq4"
#include <Controls\Dialog.mqh> 
#include <Controls\Button.mqh> 
#include <Controls\Label.mqh> 
#include <Controls\ComboBox.mqh> 

#define account AccountNumber()
#define LOT OrderLots()
#define SWAP OrderSwap()
#define SYMBOL OrderSymbol()
#define TOTAL_ORDERS OrdersTotal()
#define TICKET_NUMBER OrderTicket()
#define INFO MarketInfo(_Symbol,_Period))
#define RATE_TOTALS Bars(_Symbol,ENUM_TIMEFRAMES(_Period))
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int OnInit()
  {
   if(account!=My_Account)
      Wrong_Account();
   if(account!=My_Account)
      return(0);

   bool TimeFunction=ChartSetSymbolPeriod(chartid,charts,Timeframe);

   ChartSetInteger(Chart_ID,CHART_COLOR_CANDLE_BULL,clrSteelBlue);ChartSetInteger(Chart_ID,CHART_COLOR_CANDLE_BEAR,clrCoral);
   ChartSetInteger(Chart_ID,CHART_COLOR_CHART_UP,clrSteelBlue);   ChartSetInteger(Chart_ID,CHART_COLOR_CHART_DOWN,clrCoral);
   ChartSetInteger(Chart_ID,CHART_COLOR_BACKGROUND,clrBlack);     ChartSetInteger(Chart_ID,CHART_SHOW_PERIOD_SEP,false);
   ChartSetInteger(Chart_ID,CHART_COLOR_ASK,clrGreen);            ChartSetInteger(Chart_ID,CHART_SHOW_ASK_LINE,true);
   ChartSetInteger(Chart_ID,CHART_MODE,CHART_CANDLES);            ChartSetInteger(Chart_ID,CHART_COLOR_BID,clrBlack);
   ChartSetInteger(Chart_ID,CHART_SHOW_GRID,false);               ChartSetInteger(Chart_ID,CHART_AUTOSCROLL,true);
   ChartSetInteger(Chart_ID,CHART_SCALE,3);                       ChartSetInteger(Chart_ID,CHART_SHIFT,1);

   StartUp();

   return(INIT_SUCCEEDED);
  }
Icham Aidibe
11679
Icham Aidibe  
GrumpyDuckMan:

Hello everyone,

My first question is in regards to #include <controls\dialog>

Q 1: Does EA continue, stop, or pause while dialog has focus?

Q 2: Does #define place a variable value on loading, or is it like a const variable? 

Q 3 How do I code access to  <controls\xxx.mph> ?


1. continue

2. #define acts like #include, it's preprocessed, the program is transformed before compilation. 

3. include it, declare it, use it : 

#include <Controls\Button.mqh> 
CButton helloimabutton;
helloimabutton.Create(****);

 

To add comments, please log in or register