bbstrader 0.1.1__py3-none-any.whl → 0.1.3__py3-none-any.whl
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.
Potentially problematic release.
This version of bbstrader might be problematic. Click here for more details.
- bbstrader/metatrader/account.py +16 -13
- {bbstrader-0.1.1.dist-info → bbstrader-0.1.3.dist-info}/METADATA +2 -1
- {bbstrader-0.1.1.dist-info → bbstrader-0.1.3.dist-info}/RECORD +6 -6
- {bbstrader-0.1.1.dist-info → bbstrader-0.1.3.dist-info}/WHEEL +1 -1
- {bbstrader-0.1.1.dist-info → bbstrader-0.1.3.dist-info}/LICENSE +0 -0
- {bbstrader-0.1.1.dist-info → bbstrader-0.1.3.dist-info}/top_level.txt +0 -0
bbstrader/metatrader/account.py
CHANGED
|
@@ -28,10 +28,10 @@ _FTMO_URL_ = "https://trader.ftmo.com/?affiliates=JGmeuQqepAZLMcdOEQRp"
|
|
|
28
28
|
INIT_MSG = (
|
|
29
29
|
f"\n* Ensure you have a good and stable internet connexion\n"
|
|
30
30
|
f"* Ensure you have an activete MT5 terminal install on your machine\n"
|
|
31
|
-
f"* Ensure you have an active MT5 Account with {'or '.join(__BROKERS__.values())}\n"
|
|
32
|
-
f"* If you want to trade {', '.join(_ADMIRAL_MARKETS_PRODUCTS_)}, See {_ADMIRAL_MARKETS_URL_}\n"
|
|
33
|
-
f"* If you want to trade {', '.join(_JUST_MARKETS_PRODUCTS_)}, See {_JUST_MARKETS_URL_}\n"
|
|
34
|
-
f"* If you are looking for a prop firm, See {_FTMO_URL_}\n"
|
|
31
|
+
f"* Ensure you have an active MT5 Account with {' or '.join(__BROKERS__.values())}\n"
|
|
32
|
+
f"* If you want to trade {', '.join(_ADMIRAL_MARKETS_PRODUCTS_)}, See [{_ADMIRAL_MARKETS_URL_}]\n"
|
|
33
|
+
f"* If you want to trade {', '.join(_JUST_MARKETS_PRODUCTS_)}, See [{_JUST_MARKETS_URL_}]\n"
|
|
34
|
+
f"* If you are looking for a prop firm, See [{_FTMO_URL_}]\n"
|
|
35
35
|
)
|
|
36
36
|
|
|
37
37
|
amg_url = _ADMIRAL_MARKETS_URL_
|
|
@@ -96,9 +96,9 @@ class Account(object):
|
|
|
96
96
|
raise ValueError(
|
|
97
97
|
f"{broker} is not currently supported broker for the Account() class\n"
|
|
98
98
|
f"Currently Supported brokers are: {', '.join(supported.values())}\n"
|
|
99
|
-
f"For {supported['AMG']}, See {amg_url}\n"
|
|
100
|
-
f"For {supported['JGM']}, See {jgm_url}\n"
|
|
101
|
-
f"For {supported['FTMO']}, See {ftmo_url}\n"
|
|
99
|
+
f"For {supported['AMG']}, See [{amg_url}]\n"
|
|
100
|
+
f"For {supported['JGM']}, See [{jgm_url}]\n"
|
|
101
|
+
f"For {supported['FTMO']}, See [{ftmo_url}]\n"
|
|
102
102
|
)
|
|
103
103
|
|
|
104
104
|
def get_account_info(
|
|
@@ -189,8 +189,11 @@ class Account(object):
|
|
|
189
189
|
|
|
190
190
|
# Construct the print message based on whether a symbol is provided
|
|
191
191
|
if symbol:
|
|
192
|
-
|
|
193
|
-
|
|
192
|
+
if hasattr(info, 'description'):
|
|
193
|
+
print(
|
|
194
|
+
f"\n{info_name.upper()} INFO FOR {symbol} ({info.description})")
|
|
195
|
+
else:
|
|
196
|
+
print(f"\n{info_name.upper()} INFO FOR {symbol}")
|
|
194
197
|
else:
|
|
195
198
|
print(f"\n{info_name.upper()} INFORMATIONS:")
|
|
196
199
|
|
|
@@ -735,7 +738,7 @@ class Account(object):
|
|
|
735
738
|
else:
|
|
736
739
|
positions = mt5.positions_get()
|
|
737
740
|
|
|
738
|
-
if
|
|
741
|
+
if positions is None:
|
|
739
742
|
return None
|
|
740
743
|
if to_df:
|
|
741
744
|
df = pd.DataFrame(list(positions), columns=positions[0]._asdict())
|
|
@@ -838,7 +841,7 @@ class Account(object):
|
|
|
838
841
|
else:
|
|
839
842
|
position_deals = mt5.history_deals_get(date_from, date_to)
|
|
840
843
|
|
|
841
|
-
if
|
|
844
|
+
if position_deals is None:
|
|
842
845
|
return None
|
|
843
846
|
|
|
844
847
|
df = pd.DataFrame(list(position_deals),
|
|
@@ -914,7 +917,7 @@ class Account(object):
|
|
|
914
917
|
else:
|
|
915
918
|
orders = mt5.orders_get()
|
|
916
919
|
|
|
917
|
-
if
|
|
920
|
+
if orders is None:
|
|
918
921
|
return None
|
|
919
922
|
|
|
920
923
|
if to_df:
|
|
@@ -1017,7 +1020,7 @@ class Account(object):
|
|
|
1017
1020
|
else:
|
|
1018
1021
|
history_orders = mt5.history_orders_get(date_from, date_to)
|
|
1019
1022
|
|
|
1020
|
-
if
|
|
1023
|
+
if history_orders is None:
|
|
1021
1024
|
return None
|
|
1022
1025
|
|
|
1023
1026
|
df = pd.DataFrame(list(history_orders),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: bbstrader
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: Simplified Investment & Trading Toolkit
|
|
5
5
|
Home-page: https://github.com/bbalouki/bbstrader
|
|
6
6
|
Author: Bertin Balouki SIMYELI
|
|
@@ -38,6 +38,7 @@ Requires-Dist: Metatrader5
|
|
|
38
38
|
# Simplified Investment & Trading Toolkit
|
|
39
39
|

|
|
40
40
|
|
|
41
|
+
[](https://bbstrader.readthedocs.io/en/latest/?badge=latest)
|
|
41
42
|
|
|
42
43
|
## Overview
|
|
43
44
|
|
|
@@ -10,7 +10,7 @@ bbstrader/btengine/performance.py,sha256=Pz-qZb7EglPt8TMKs5ZCgo-af54UCOfqWKpEH8B
|
|
|
10
10
|
bbstrader/btengine/portfolio.py,sha256=RXGJTmg1NIq0MSkMB6v6hmCG4xfdwLo9rO1_UCAX7As,14008
|
|
11
11
|
bbstrader/btengine/strategy.py,sha256=tY5ek37NxLrYftgzJ4CqMGDFv5oMkvMsBbOkkOGghKw,1384
|
|
12
12
|
bbstrader/metatrader/__init__.py,sha256=y4JLz05esm3PKerHMgtd3dmRpa7yUvWVuj_xOnlhXSA,261
|
|
13
|
-
bbstrader/metatrader/account.py,sha256=
|
|
13
|
+
bbstrader/metatrader/account.py,sha256=V5VbkUP2OawEuvRSGAAr_L0gXXdiwiACBD5hDXm-cbE,42651
|
|
14
14
|
bbstrader/metatrader/rates.py,sha256=tGcWh2t9Yilik8YDMN2_VBeWV4VNa4zHABmOT98rW8g,8286
|
|
15
15
|
bbstrader/metatrader/risk.py,sha256=tGpmP6pOtbn4iWtX4P6Gl2Z5YuP2jRI5g7Z8pybsO58,25134
|
|
16
16
|
bbstrader/metatrader/trade.py,sha256=KKJ1nM7dsK0CYBQXN9OU0X0KRd3Ywh9ztgXWnwhfv8M,57099
|
|
@@ -21,8 +21,8 @@ bbstrader/trading/__init__.py,sha256=yZ85EALV2sSCzCPxaeFYlk1JJhYQq2C-xSd5EEQYvI8
|
|
|
21
21
|
bbstrader/trading/execution.py,sha256=geiIiR9ldTJvM6rapa66Xug-gRcA_YqfA6kCr54lnRw,46708
|
|
22
22
|
bbstrader/trading/run.py,sha256=UA5Sn5nWOqsezZVGCM_kjOPPsu_IxMdSABUBnBAJA-k,3474
|
|
23
23
|
bbstrader/trading/utils.py,sha256=Eu_cBnfPcOGel4Lj6Dc-UCl-h7NqR8Rfv9RZtaxNRos,7711
|
|
24
|
-
bbstrader-0.1.
|
|
25
|
-
bbstrader-0.1.
|
|
26
|
-
bbstrader-0.1.
|
|
27
|
-
bbstrader-0.1.
|
|
28
|
-
bbstrader-0.1.
|
|
24
|
+
bbstrader-0.1.3.dist-info/LICENSE,sha256=1EudjwwP2oTJy8Vh0e-Kzv8VZZU95y-t6c3DYhR51uc,1115
|
|
25
|
+
bbstrader-0.1.3.dist-info/METADATA,sha256=Bkx_7tWwzJeyz2kEO5lOQzcYwEbz33U7dt2nvvq2w4c,9029
|
|
26
|
+
bbstrader-0.1.3.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
|
|
27
|
+
bbstrader-0.1.3.dist-info/top_level.txt,sha256=Wwj322jZmxGZ6gD_TdaPiPLjED5ReObm5omerwlmZIg,10
|
|
28
|
+
bbstrader-0.1.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|