//+------------------------------------------------------------------+
//|                                                  GVSet - MOD.mq4 |
//|                        Copyright 2015, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2015, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+

// Bruster400 Mods:  Now coded to set all three required GV's rather than 1
//                   Added confimation message box rather than alert.


// This script sets up the GV's needed for the EasyOrder Script:


#define GV1 "EO_ALLOWTRADING"
#define GV2 "EO_NOCONFIRMATION"
#define GV3 "EO_ORDERCOUNT"
 
  
void OnStart() {
	
	GlobalVariableSet(GV1, 1);
	Sleep(500);
	GlobalVariableSet(GV2, 1);
   Sleep(500);
	GlobalVariableSet(GV3, 4);
   Sleep(500);

   // check this has worked:
	string text;
	text = "Results: ";
  	if (GlobalVariableCheck(GV1))text += "GV1:OK "; 
  	else text += "GV1:ERROR ";
  	if (GlobalVariableCheck(GV2))text += "GV2:OK "; 
  	else text += "GV2:ERROR ";
  	if (GlobalVariableCheck(GV3))text += "GV3:OK "; 
  	else text += "GV3:ERROR ";
  	
  // message box:
    int returncode = MessageBox(text,NULL,MB_OK);
            
  
}
//+------------------------------------------------------------------+
