Skip to content

Commit e2d9868

Browse files
authored
Merge pull request #5 from erlonfs/develop
Develop
2 parents fc63db2 + 7493e06 commit e2d9868

File tree

14 files changed

+145
-12
lines changed

14 files changed

+145
-12
lines changed

Experts/Benchmark/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Metatrader 5 Robots
2+
3+
4+
5+
## Bench mark
6+
7+
Este é apenas um exemplo para começar...
8+
9+
10+
1.88 KB
Binary file not shown.

Experts/Benchmark/benchmark.ico

5.3 KB
Binary file not shown.

Experts/Benchmark/benchmark.mq5

11.8 KB
Binary file not shown.
10 Bytes
Binary file not shown.
10 Bytes
Binary file not shown.
6.84 KB
Binary file not shown.

Include/Framework/Base.mqh

-44 Bytes
Binary file not shown.

Include/Framework/Enum.mqh

-420 Bytes
Binary file not shown.

Include/Robots/Benchmark.mqh

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
//+------------------------------------------------------------------+
2+
//| Copyright 2017, Erlon F. Souza |
3+
//| https://github.com/erlonfs |
4+
//+------------------------------------------------------------------+
5+
6+
#property copyright "Copyright 2016, Erlon F. Souza"
7+
#property link "https://github.com/erlonfs"
8+
#property version "1.00"
9+
10+
#include <Trade\Trade.mqh>
11+
#include <Trade\PositionInfo.mqh>
12+
#include <Framework\Base.mqh>
13+
14+
class Benchmark : public Base
15+
{
16+
private:
17+
//Price
18+
MqlRates _rates[];
19+
ENUM_TIMEFRAMES _period;
20+
21+
//Estrategia
22+
double _maxima;
23+
double _minima;
24+
25+
//Grafico
26+
color _corBuy;
27+
color _corSell;
28+
color _cor;
29+
bool _isDesenhar;
30+
bool _isEnviarParaTras;
31+
bool _isPreencher;
32+
33+
public:
34+
35+
void SetColor(color cor) {
36+
_cor = cor;
37+
}
38+
39+
void SetIsDesenhar(bool isDesenhar) {
40+
_isDesenhar = isDesenhar;
41+
}
42+
43+
void SetIsEnviarParaTras(bool isEnviarParaTras) {
44+
_isEnviarParaTras = isEnviarParaTras;
45+
}
46+
47+
void SetIsPreencher(bool isPreencher) {
48+
_isPreencher = isPreencher;
49+
}
50+
51+
void SetColorBuy(color cor) {
52+
_corBuy = cor;
53+
};
54+
55+
void SetColorSell(color cor) {
56+
_corSell = cor;
57+
};
58+
59+
void Load() {
60+
61+
};
62+
63+
void Watch() {
64+
65+
AtualizarLastPrice();
66+
67+
if (HasPositionOpen()) {
68+
ManagePosition();
69+
return;
70+
}
71+
72+
if (!Validate()) {
73+
return;
74+
}
75+
76+
if (GetBuffers()) {
77+
78+
ShowInfo();
79+
80+
}
81+
82+
};
83+
84+
void Desenhar()
85+
{
86+
if (!_isDesenhar) {
87+
return;
88+
}
89+
90+
//Drawn something
91+
92+
}
93+
94+
bool GetBuffers() {
95+
96+
//Get Buffers
97+
98+
return true;
99+
}
100+
101+
};
102+

0 commit comments

Comments
 (0)