forked from jimtin/python_trading_bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
exceptions.py
86 lines (60 loc) · 2.05 KB
/
exceptions.py
1
2
3
4
5
6
7
8
9
10
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Initialize MetaTrader Error
class MetaTraderInitializeError(Exception):
"MetaTrader 5 Initilization failed. Check username, password, server, path"
pass
# Login to MetaTrader Error
class MetaTraderLoginError(Exception):
"Error logging in to MetaTrader"
pass
# Incorrect symbol provided
class MetaTraderSymbolDoesNotExistError(Exception):
"One of the provided symbols does not exist"
pass
# Symbol unable to be enabled
class MetaTraderSymbolUnableToBeEnabledError(Exception):
"One of the symbols provided was not able to be enabled"
pass
# Algo Trading enabled on MetaTrader 5
class MetaTraderAlgoTradingNotDisabledError(Exception):
"Turn AlgoTrading off on MetaTrader terminal to use Python Trading Bot"
pass
# Error placing order
class MetaTraderOrderPlacingError(Exception):
"Error placing order on MetaTrader"
pass
# Error with balance check
class MetaTraderOrderCheckError(Exception):
"Error checking order on MetaTrader"
pass
# Error canceling order
class MetaTraderCancelOrderError(Exception):
"Error canceling order on MetaTrader"
pass
# Error modifying a position MetaTrader
class MetaTraderModifyPositionError(Exception):
"Error modifying position on MetaTrader"
pass
# Error closing a position
class MetaTraderClosePositionError(Exception):
"Error closing a position on MetaTrader"
pass
# Error for having a zero stop price on a BUY_STOP or SELL_STOP
class MetaTraderIncorrectStopPriceError(Exception):
"Cannot have a 0.00 price on a STOP order"
pass
# Error for zero ticks returned from query
class MetaTraderZeroTicksDownloadedError(Exception):
"Zero ticks retrieved from MetaTrader 5 Terminal"
pass
# SQL Error
class SQLTableCreationError(Exception):
"Error creating SQL table"
pass
# SQL Back Test Trade Action Error
class SQLBacktestTradeActionError(Exception):
"Error inserting SQL Trade Action"
pass
# Backtest error
class BacktestIncorrectBacktestTimeframeError(Exception):
"Incorrect timeframe selected for backtest timeframe"
pass