Spaces:
No application file
No application file
| import sys | |
| import warnings | |
| import winsound | |
| from datetime import datetime as dt | |
| from datetime import timedelta | |
| from pathlib import Path | |
| from pprint import pprint | |
| import matplotlib.pyplot as plt | |
| import MetaTrader5 as mt5 | |
| import seaborn as sns | |
| ROOT = Path(__file__).resolve().parents[2] | |
| if str(ROOT) not in sys.path: | |
| sys.path.insert(0, str(ROOT)) | |
| from afml.data_structures.bars import * | |
| from afml.labeling import ( | |
| fixed_time_horizon, | |
| get_bins, | |
| get_events, | |
| triple_barrier_labels, | |
| ) | |
| from afml.strategies import ( | |
| BaseStrategy, | |
| BollingerStrategy, | |
| MACrossoverStrategy, | |
| TripleBarrierEvaluator, | |
| get_entries, | |
| ) | |
| from afml.util import ( | |
| COMMODITIES, | |
| CRYPTO, | |
| DATA_PATH, | |
| FX_MAJORS, | |
| PERCENTILES, | |
| UTC, | |
| DataFrameFormatter, | |
| value_counts_data, | |
| ) | |
| from afml.mt5.load_data import ( | |
| get_ticks, | |
| load_tick_data, | |
| login_mt5, | |
| save_data_to_parquet, | |
| verify_or_create_account_info, | |
| ) | |
| warnings.filterwarnings("ignore") | |
| plt.style.use("dark_background") | |
| sns.set_palette("husl") | |
| if __name__ == "__main__": | |
| print("afml.util.test imports resolved successfully.") | |