mtcli 2.0.0__tar.gz → 2.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mtcli-2.0.0 → mtcli-2.1.0}/PKG-INFO +1 -2
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/conf.py +54 -62
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/views/view_full.py +2 -2
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli.egg-info/PKG-INFO +1 -2
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli.egg-info/requires.txt +0 -1
- {mtcli-2.0.0 → mtcli-2.1.0}/pyproject.toml +2 -3
- {mtcli-2.0.0 → mtcli-2.1.0}/setup.py +3 -5
- {mtcli-2.0.0 → mtcli-2.1.0}/LICENSE +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/README.md +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/__init__.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/bars.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/conecta.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/data/__init__.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/data/base.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/data/csv.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/data/mt5.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/logger.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/models/__init__.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/models/model_bar.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/models/model_bars.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/models/model_chart.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/models/model_consecutive_bars.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/models/model_rates.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/models/model_signals.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/models/model_unconsecutive_bar.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/mt.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/__init__.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/agressao/__init__.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/agressao/command.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/agressao/conf.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/agressao/models/__init__.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/agressao/models/model_agressao.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/agressao/views/__init__.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/agressao/views/view_agressao.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/media_movel/__init__.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/media_movel/command.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/media_movel/conf.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/media_movel/models/__init__.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/media_movel/models/model_media_movel.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/media_movel/tests/__init__.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/media_movel/tests/test_mm.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/media_movel/tests/test_model_media_movel.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/range_medio/__init__.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/range_medio/command.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/range_medio/conf.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/range_medio/models/__init__.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/range_medio/models/model_average_range.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/range_medio/tests/__init__.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/range_medio/tests/test_rm.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/volume_medio/__init__.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/volume_medio/command.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/volume_medio/conf.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/volume_medio/models/__init__.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/volume_medio/models/model_average_volume.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/volume_medio/tests/__init__.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/plugins/volume_medio/tests/test_vm.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/views/__init__.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/views/view_close.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/views/view_high.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/views/view_low.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/views/view_min.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/views/view_open.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/views/view_ranges.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/views/view_rates.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/views/view_vars.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli/views/view_volumes.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli.egg-info/SOURCES.txt +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli.egg-info/dependency_links.txt +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli.egg-info/entry_points.txt +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli.egg-info/not-zip-safe +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/mtcli.egg-info/top_level.txt +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/setup.cfg +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/tests/__init__.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/tests/models/__init__.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/tests/models/test_model_bar.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/tests/models/test_model_consecutive_bars.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/tests/models/test_model_signals.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/tests/models/test_model_unconsecutive_bar.py +0 -0
- {mtcli-2.0.0 → mtcli-2.1.0}/tests/test_bars.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mtcli
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1.0
|
|
4
4
|
Summary: Aplicativo CLI para exibir gráficos do MetaTrader 5 em texto acessível ao leitor de telas
|
|
5
5
|
Home-page: https://github.com/vfranca/mtcli
|
|
6
6
|
Author: Valmir França da Silva
|
|
@@ -16,7 +16,6 @@ Description-Content-Type: text/markdown
|
|
|
16
16
|
License-File: LICENSE
|
|
17
17
|
Requires-Dist: click<9.0.0,>=8.2.1
|
|
18
18
|
Requires-Dist: metatrader5<6.0.0,>=5.0.5260
|
|
19
|
-
Requires-Dist: python-dotenv<2.0.0,>=1.1.1
|
|
20
19
|
Provides-Extra: build
|
|
21
20
|
Requires-Dist: pyinstaller; extra == "build"
|
|
22
21
|
Dynamic: author
|
|
@@ -3,63 +3,72 @@
|
|
|
3
3
|
import os
|
|
4
4
|
import configparser
|
|
5
5
|
import click
|
|
6
|
-
import dotenv
|
|
7
6
|
import MetaTrader5 as mt5
|
|
8
7
|
from mtcli.conecta import conectar, shutdown
|
|
9
8
|
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
rompimento_baixa = os.getenv("ROMPIMENTO_BAIXA", default["rompimento_baixa"])
|
|
10
|
+
CONFIG_PATH = os.path.abspath("mtcli.ini")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def carregar_config():
|
|
14
|
+
config = configparser.ConfigParser()
|
|
15
|
+
if os.path.exists(CONFIG_PATH):
|
|
16
|
+
config.read(CONFIG_PATH)
|
|
17
|
+
else:
|
|
18
|
+
config["DEFAULT"] = {}
|
|
19
|
+
return config
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def salvar_config(config):
|
|
23
|
+
with open(CONFIG_PATH, "w") as f:
|
|
24
|
+
config.write(f)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
config = carregar_config()
|
|
28
|
+
section = "DEFAULT"
|
|
29
|
+
digitos = int(os.getenv("DIGITOS", config[section].getint("digitos", fallback=2)))
|
|
30
|
+
lateral = os.getenv("LATERAL", config[section].get("lateral", fallback="doji"))
|
|
31
|
+
alta = os.getenv("ALTA", config[section].get("alta", fallback="verde"))
|
|
32
|
+
baixa = os.getenv("BAIXA", config[section].get("baixa", fallback="vermelho"))
|
|
33
|
+
rompimento_alta = os.getenv(
|
|
34
|
+
"ROMPIMENTO_ALTA", config[section].get("rompimento_alta", fallback="c")
|
|
35
|
+
)
|
|
36
|
+
rompimento_baixa = os.getenv(
|
|
37
|
+
"ROMPIMENTO_BAIXA", config[section].get("rompimento_baixa", fallback="v")
|
|
38
|
+
)
|
|
41
39
|
percentual_rompimento = int(
|
|
42
|
-
os.getenv(
|
|
40
|
+
os.getenv(
|
|
41
|
+
"PERCENTUAL_ROMPIMENTO",
|
|
42
|
+
config[section].getint("percentual_rompimento", fallback=50),
|
|
43
|
+
)
|
|
44
|
+
)
|
|
45
|
+
percentual_doji = int(
|
|
46
|
+
os.getenv("PERCENTUAL_DOJI", config[section].getint("percentual_doji", fallback=10))
|
|
47
|
+
)
|
|
48
|
+
up_bar = os.getenv("UP_BAR", config[section].get("up_bar", fallback="asc"))
|
|
49
|
+
down_bar = os.getenv("DOWN_BAR", config[section].get("down_bar", fallback="desc"))
|
|
50
|
+
inside_bar = os.getenv("INSIDE_BAR", config[section].get("inside_bar", fallback="ib"))
|
|
51
|
+
outside_bar = os.getenv(
|
|
52
|
+
"OUTSIDE_BAR", config[section].get("outside_bar", fallback="ob")
|
|
53
|
+
)
|
|
54
|
+
sombra_superior = os.getenv(
|
|
55
|
+
"SOMBRA_SUPERIOR", config[section].get("sombra_superior", fallback="top")
|
|
56
|
+
)
|
|
57
|
+
sombra_inferior = os.getenv(
|
|
58
|
+
"SOMBRA_INFERIOR", config[section].get("sombra_inferior", fallback="bottom")
|
|
59
|
+
)
|
|
60
|
+
data_source = dados = os.getenv("DADOS", config[section].get("dados", fallback="mt5"))
|
|
61
|
+
csv_path = mt5_pasta = os.getenv(
|
|
62
|
+
"MT5_PASTA", config[section].get("mt5_pasta", fallback="")
|
|
43
63
|
)
|
|
44
|
-
percentual_doji = int(os.getenv("PERCENTUAL_DOJI", default["percentual_doji"]))
|
|
45
|
-
up_bar = os.getenv("UP_BAR", default["up_bar"])
|
|
46
|
-
down_bar = os.getenv("DOWN_BAR", default["down_bar"])
|
|
47
|
-
inside_bar = os.getenv("INSIDE_BAR", default["inside_bar"])
|
|
48
|
-
outside_bar = os.getenv("OUTSIDE_BAR", default["outside_bar"])
|
|
49
|
-
gap = os.getenv("GAP", default["gap"])
|
|
50
|
-
sombra_superior = os.getenv("SOMBRA_SUPERIOR", default["sombra_superior"])
|
|
51
|
-
sombra_inferior = os.getenv("SOMBRA_INFERIOR", default["sombra_inferior"])
|
|
52
|
-
ponto_medio = os.getenv("PONTO_MEDIO", default["ponto_medio"])
|
|
53
|
-
data_source = os.getenv("DADOS", default["dados"]).upper()
|
|
54
|
-
csv_path = os.getenv("MT5_PASTA", default["mt5_pasta"])
|
|
55
64
|
|
|
56
65
|
|
|
57
66
|
def get_data_source():
|
|
58
67
|
from mtcli.data import CsvDataSource, MT5DataSource
|
|
59
68
|
|
|
60
|
-
if data_source == "
|
|
69
|
+
if data_source.lower() == "csv":
|
|
61
70
|
return CsvDataSource()
|
|
62
|
-
elif data_source == "
|
|
71
|
+
elif data_source.lower() == "mt5":
|
|
63
72
|
return MT5DataSource()
|
|
64
73
|
else:
|
|
65
74
|
raise ValueError(f"Fonte de dados desconhecida: {data_source}")
|
|
@@ -102,23 +111,6 @@ timeframes = [
|
|
|
102
111
|
]
|
|
103
112
|
|
|
104
113
|
|
|
105
|
-
CONFIG_PATH = os.path.abspath("mtcli.ini")
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
def carregar_config():
|
|
109
|
-
config = configparser.ConfigParser()
|
|
110
|
-
if os.path.exists(CONFIG_PATH):
|
|
111
|
-
config.read(CONFIG_PATH)
|
|
112
|
-
else:
|
|
113
|
-
config["DEFAULT"] = {}
|
|
114
|
-
return config
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
def salvar_config(config):
|
|
118
|
-
with open(CONFIG_PATH, "w") as f:
|
|
119
|
-
config.write(f)
|
|
120
|
-
|
|
121
|
-
|
|
122
114
|
@click.command()
|
|
123
115
|
@click.option("--list", "list_", is_flag=True, help="Lista todas as configurações.")
|
|
124
116
|
@click.option("--set", "set_", nargs=2, help="Define o valor de uma configuração.")
|
|
@@ -40,7 +40,7 @@ class FullView:
|
|
|
40
40
|
elif sombra == conf.sombra_inferior:
|
|
41
41
|
sombra = f"{sombra}{bar.bottom}"
|
|
42
42
|
|
|
43
|
-
gap_str = f"{
|
|
43
|
+
gap_str = f"g{gap:.{conf.digitos}f}" if gap else ""
|
|
44
44
|
corpo = abs(bar.body)
|
|
45
45
|
|
|
46
46
|
prefixo = f"{n} " if self.numerator else ""
|
|
@@ -56,7 +56,7 @@ class FullView:
|
|
|
56
56
|
f"{bar.high:.{conf.digitos}f} "
|
|
57
57
|
f"{bar.low:.{conf.digitos}f} "
|
|
58
58
|
f"{bar.close:.{conf.digitos}f}"
|
|
59
|
-
f"{
|
|
59
|
+
f"m{bar.medium_point:.{conf.digitos}f} "
|
|
60
60
|
f"R{bar.range:.{conf.digitos}f}{sufixo}"
|
|
61
61
|
)
|
|
62
62
|
views.append(linha.upper())
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mtcli
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1.0
|
|
4
4
|
Summary: Aplicativo CLI para exibir gráficos do MetaTrader 5 em texto acessível ao leitor de telas
|
|
5
5
|
Home-page: https://github.com/vfranca/mtcli
|
|
6
6
|
Author: Valmir França da Silva
|
|
@@ -16,7 +16,6 @@ Description-Content-Type: text/markdown
|
|
|
16
16
|
License-File: LICENSE
|
|
17
17
|
Requires-Dist: click<9.0.0,>=8.2.1
|
|
18
18
|
Requires-Dist: metatrader5<6.0.0,>=5.0.5260
|
|
19
|
-
Requires-Dist: python-dotenv<2.0.0,>=1.1.1
|
|
20
19
|
Provides-Extra: build
|
|
21
20
|
Requires-Dist: pyinstaller; extra == "build"
|
|
22
21
|
Dynamic: author
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "mtcli"
|
|
3
|
-
version = "2.
|
|
3
|
+
version = "2.1.0"
|
|
4
4
|
description = "Aplicativo CLI para exibir gráficos do MetaTrader 5 em texto acessível ao leitor de telas"
|
|
5
5
|
authors = [
|
|
6
6
|
{name = "Valmir França da Silva",email = "vfranca3@gmail.com"}
|
|
@@ -12,7 +12,6 @@ requires-python = ">=3.10,<3.14.0"
|
|
|
12
12
|
dependencies = [
|
|
13
13
|
"click (>=8.2.1,<9.0.0)",
|
|
14
14
|
"metatrader5 (>=5.0.5260,<6.0.0)",
|
|
15
|
-
"python-dotenv (>=1.1.1,<2.0.0)"
|
|
16
15
|
]
|
|
17
16
|
|
|
18
17
|
[project.urls]
|
|
@@ -47,9 +46,9 @@ env = [
|
|
|
47
46
|
"ROMPIMENTO_BAIXA=V",
|
|
48
47
|
"SOMBRA_SUPERIOR=TOP",
|
|
49
48
|
"SOMBRA_INFERIOR=BOTTOM",
|
|
50
|
-
"PONTO_MEDIO=M",
|
|
51
49
|
"PERCENTUAL_DOJI=10",
|
|
52
50
|
"PERCENTUAL_ROMPIMENTO=50",
|
|
51
|
+
"DADOS=csv",
|
|
53
52
|
"MT5_PASTA=C:/Users/Administrador/cli/mtcli/tests/fixtures/Files"
|
|
54
53
|
]
|
|
55
54
|
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="mtcli",
|
|
5
|
-
version="2.
|
|
5
|
+
version="2.1.0",
|
|
6
6
|
description="Aplicativo CLI para exibir gráficos do MetaTrader 5 em texto acessível ao leitor de telas",
|
|
7
7
|
long_description=open("README.md", encoding="utf-8").read(),
|
|
8
8
|
long_description_content_type="text/markdown",
|
|
@@ -13,10 +13,8 @@ setup(
|
|
|
13
13
|
python_requires=">=3.10,<3.14.0",
|
|
14
14
|
packages=find_packages(),
|
|
15
15
|
install_requires=[
|
|
16
|
-
"click>=8.2.
|
|
17
|
-
"
|
|
18
|
-
"metatrader5>=5.0.4993,<6.0.0",
|
|
19
|
-
"numpy>=2.2.5,<3.0.0",
|
|
16
|
+
"click (>=8.2.1,<9.0.0)",
|
|
17
|
+
"metatrader5 (>=5.0.5260,<6.0.0)",
|
|
20
18
|
],
|
|
21
19
|
extras_require={
|
|
22
20
|
"build": ["pyinstaller"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|