mtcli-risco 1.0.0__tar.gz → 1.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_risco-1.0.0 → mtcli_risco-1.1.0}/PKG-INFO +1 -1
- {mtcli_risco-1.0.0 → mtcli_risco-1.1.0}/mtcli_risco/plugin.py +5 -6
- {mtcli_risco-1.0.0 → mtcli_risco-1.1.0}/pyproject.toml +1 -1
- {mtcli_risco-1.0.0 → mtcli_risco-1.1.0}/LICENSE +0 -0
- {mtcli_risco-1.0.0 → mtcli_risco-1.1.0}/README.md +0 -0
- {mtcli_risco-1.0.0 → mtcli_risco-1.1.0}/mtcli_risco/__init__.py +0 -0
- {mtcli_risco-1.0.0 → mtcli_risco-1.1.0}/mtcli_risco/conf.py +0 -0
- {mtcli_risco-1.0.0 → mtcli_risco-1.1.0}/mtcli_risco/risco.py +0 -0
|
@@ -11,6 +11,7 @@ from .risco import (
|
|
|
11
11
|
risco_excedido,
|
|
12
12
|
encerrar_todas_posicoes,
|
|
13
13
|
cancelar_todas_ordens,
|
|
14
|
+
calcular_lucro_total_dia,
|
|
14
15
|
)
|
|
15
16
|
|
|
16
17
|
|
|
@@ -26,20 +27,18 @@ log = setup_logger()
|
|
|
26
27
|
help="Limite de perda diária (ex: -500), default -180.00.",
|
|
27
28
|
)
|
|
28
29
|
@click.option(
|
|
29
|
-
"--
|
|
30
|
+
"--lucro",
|
|
30
31
|
is_flag=True,
|
|
31
32
|
default=False,
|
|
32
33
|
help="Exibe o lucro total do dia atualizado e sai.",
|
|
33
34
|
)
|
|
34
|
-
def cli(limite,
|
|
35
|
+
def cli(limite, lucro):
|
|
35
36
|
"""Monitora e bloqueia ordens se o limite de prejuízo for atingido."""
|
|
36
37
|
conectar()
|
|
37
38
|
|
|
38
|
-
if
|
|
39
|
-
from .risco import calcular_lucro_total_dia
|
|
40
|
-
|
|
39
|
+
if lucro:
|
|
41
40
|
lucro = calcular_lucro_total_dia()
|
|
42
|
-
click.echo(f"Lucro total do dia
|
|
41
|
+
click.echo(f"Lucro total do dia: {lucro:.2f}")
|
|
43
42
|
shutdown()
|
|
44
43
|
return
|
|
45
44
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|