1 /*=============================================================
\r
4 Author: Erich Pribitzer
\r
7 Notes: DIGITS Bug removed
\r
12 Copyright (C) 2010 Erich Pribitzer
\r
14 =============================================================*/
\r
16 #property copyright "Copyright © 2011, Erich Pribitzer"
\r
17 #property link "http://www.wartris.com"
\r
19 #include <stderror.mqh>
\r
20 #include <stdlib.mqh>
\r
22 #define ERR_DOUBLE_ORDER 30001
\r
23 #define ERR_ORDER_SETTINGS 30002
\r
24 #define ERR_TIMEFRAME_DISABLED 30003
\r
25 #define ERR_LIB_NOT_INITALIZED 30004
\r
28 #define PERIOD_M10 10
\r
29 #define PERIOD_H2 120
\r
37 extern string BA_SETTINGS = "===== BASIC SETTINGS ====";
\r
38 extern bool BA_ENABLE_M1 = true;
\r
39 extern bool BA_ENABLE_M5 = true;
\r
40 extern bool BA_ENABLE_M10 = false;
\r
41 extern bool BA_ENABLE_M15 = true;
\r
42 extern bool BA_ENABLE_M30 = true;
\r
43 extern bool BA_ENABLE_H1 = true;
\r
44 extern bool BA_ENABLE_H2 = false;
\r
45 extern bool BA_ENABLE_H4 = true;
\r
46 extern bool BA_ENABLE_D1 = true;
\r
47 extern bool BA_ENABLE_W1 = true;
\r
48 extern bool BA_ENABLE_MN = true;
\r
49 extern int BA_INIT_BARS = 200;
\r
52 int timeframe[]={1,5,10,15,30,60,120,240,1440,10080,43200};
\r
54 string timeframeString[]={ "M01","M05","M10","M15","M30","H01","H02","H04","D01","W01","MN"};
\r
55 string dirString[]={ "-","S","L","s","l"};
\r
58 bool BasicInc_Initialized;
\r
61 bool FIVEDIGITS = false;
\r
67 Print("Init BasicInc");
\r
68 if(Digits == 5 || (Digits == 3 && StringFind(Symbol(),"SILVER",0)==-1 ))
\r
71 // DIGITS=Digits-1; Bug
\r
82 if(MarketInfo(Symbol(),MODE_LOTSTEP)==0.01)
\r
91 BasicInc_Initialized=true;
\r
94 bool IsTimeframeEnabled(int period)
\r
99 return (BA_ENABLE_M1);
\r
101 return (BA_ENABLE_M5);
\r
103 return (BA_ENABLE_M10);
\r
105 return (BA_ENABLE_M15);
\r
107 return (BA_ENABLE_M30);
\r
109 return (BA_ENABLE_H1);
\r
111 return (BA_ENABLE_H2);
\r
113 return (BA_ENABLE_H4);
\r
115 return (BA_ENABLE_D1);
\r
117 return (BA_ENABLE_W1);
\r
119 return (BA_ENABLE_MN);
\r
123 int nPeriod(int p=-1)
\r