File tree Expand file tree Collapse file tree 3 files changed +39
-2
lines changed
Include/BadRobot.Framework Expand file tree Collapse file tree 3 files changed +39
-2
lines changed Original file line number Diff line number Diff line change 1+ //+------------------------------------------------------------------+
2+ //| Copyright 2018, Erlon F. Souza |
3+ //| https://github.com/erlonfs |
4+ //+------------------------------------------------------------------+
5+
6+ #property copyright " Copyright 2018, Erlon F. Souza"
7+ #property link " https://github.com/erlonfs"
8+ #property version " 1.0"
9+
10+ class Account
11+ {
12+ private :
13+ ENUM_ACCOUNT_TRADE_MODE _tradeMode ;
14+ ENUM_ACCOUNT_MARGIN_MODE _marginMode ;
15+
16+ public :
17+
18+ Account (){
19+ _tradeMode = (ENUM_ACCOUNT_TRADE_MODE )AccountInfoInteger (ACCOUNT_TRADE_MODE );
20+ _marginMode = (ENUM_ACCOUNT_MARGIN_MODE )AccountInfoInteger (ACCOUNT_MARGIN_MODE );
21+ }
22+
23+ bool IsReal (){
24+ return _tradeMode == ACCOUNT_TRADE_MODE_REAL ;
25+ }
26+
27+ bool IsDemo (){
28+ return _tradeMode == ACCOUNT_TRADE_MODE_DEMO ;
29+ }
30+
31+ bool IsHedging (){
32+ return _marginMode == ACCOUNT_MARGIN_MODE_RETAIL_HEDGING ;
33+ }
34+
35+
36+
37+ };
Original file line number Diff line number Diff line change @@ -35,14 +35,14 @@ class Logger
3535
3636 string newText = (TimeToString (TimeCurrent (), TIME_SECONDS )) + " > " + text ;
3737
38- if (_logs [ 0 ] == NULL ){
38+ if (Logger :: Last () == NULL ){
3939 Add (newText );
4040 return ;
4141 }
4242
4343 string textAux [];
4444
45- StringSplit (_logs [ 0 ] , 62 , textAux );
45+ StringSplit (Logger :: Last () , 62 , textAux );
4646 StringTrimLeft (textAux [1 ]);
4747 StringTrimRight (textAux [1 ]);
4848
You can’t perform that action at this time.
0 commit comments