MODE_TRADES = 0
MODE_HISTORY = 1

SELECT_BY_POS = 0
SELECT_BY_TICKET = 1

# https://docs.mql4.com/constants/tradingconstants/signalproperties
SIGNAL_BASE_BALANCE = 17
SIGNAL_BASE_EQUITY = 19
SIGNAL_BASE_GAIN = 16
SIGNAL_BASE_MAX_DRAWDOWN = 18
SIGNAL_BASE_PRICE = 15
SIGNAL_BASE_ROI = 20

SIGNAL_BASE_DATE_PUBLISHED = 1
SIGNAL_BASE_DATE_STARTED = 2
SIGNAL_BASE_ID = 0
SIGNAL_BASE_LEVERAGE = 6
SIGNAL_BASE_PIPS = 8
SIGNAL_BASE_RATING = 9
SIGNAL_BASE_SUBSCRIBERS = 4
SIGNAL_BASE_TRADES = 7
SIGNAL_BASE_TRADE_MODE = 5

SIGNAL_BASE_AUTHOR_LOGIN = 13
SIGNAL_BASE_BROKER = 10
SIGNAL_BASE_BROKER_SERVER = 11
SIGNAL_BASE_NAME = 12
SIGNAL_BASE_CURRENCY = 14

SIGNAL_INFO_EQUITY_LIMIT = 8
SIGNAL_INFO_SLIPPAGE = 9
SIGNAL_INFO_VOLUME_PERCENT = 7

SIGNAL_INFO_CONFIRMATIONS_DISABLED = 4
SIGNAL_INFO_COPY_SLTP = 3
SIGNAL_INFO_DEPOSIT_PERCENT = 5
SIGNAL_INFO_ID = 0
SIGNAL_INFO_SUBSCRIPTION_ENABLED = 1
SIGNAL_INFO_TERMS_AGREE = 2

SIGNAL_INFO_NAME = 6

# https://docs.mql4.com/constants/tradingconstants/orderproperties
OP_BUY = 0
OP_SELL = 1
OP_BUYLIMIT = 2
OP_BUYSTOP = 3
OP_SELLLIMIT = 4
OP_SELLSTOP = 5

# https://docs.mql4.com/constants/environment_state/accountinformation#enum_account_info_double
ACCOUNT_LOGIN = 0
ACCOUNT_TRADE_MODE = 32
ACCOUNT_LEVERAGE = 35
ACCOUNT_LIMIT_ORDERS = 47
ACCOUNT_MARGIN_SO_MODE = 44
ACCOUNT_TRADE_ALLOWED = 33
ACCOUNT_TRADE_EXPERT = 34

ACCOUNT_BALANCE = 37
ACCOUNT_CREDIT = 38
ACCOUNT_PROFIT = 39
ACCOUNT_EQUITY = 40
ACCOUNT_MARGIN = 41
ACCOUNT_MARGIN_FREE = 42
ACCOUNT_MARGIN_LEVEL = 43
ACCOUNT_MARGIN_SO_CALL = 45
ACCOUNT_MARGIN_SO_SO = 46
ACCOUNT_MARGIN_INITIAL = 48
ACCOUNT_MARGIN_MAINTENANCE = 49
ACCOUNT_ASSETS = 50
ACCOUNT_LIABILITIES = 51
ACCOUNT_COMMISSION_BLOCKED = 52

ACCOUNT_NAME = 1
ACCOUNT_SERVER = 3
ACCOUNT_CURRENCY = 36
ACCOUNT_COMPANY = 2

ACCOUNT_TRADE_MODE_DEMO = 0
ACCOUNT_TRADE_MODE_CONTEST = 1
ACCOUNT_TRADE_MODE_REAL = 2

ACCOUNT_STOPOUT_MODE_PERCENT = 0
ACCOUNT_STOPOUT_MODE_MONEY = 1

# https://docs.mql4.com/constants/environment_state/marketinfoconstants#enum_day_of_week
MODE_LOW = 1
MODE_HIGH = 2
MODE_TIME = 5
MODE_BID = 9
MODE_ASK = 10
MODE_POINT = 11
MODE_DIGITS = 12
MODE_SPREAD = 13
MODE_STOPLEVEL = 14
MODE_LOTSIZE = 15
MODE_TICKVALUE = 16
MODE_TICKSIZE = 17
MODE_SWAPLONG = 18
MODE_SWAPSHORT = 19
MODE_STARTING = 20
MODE_EXPIRATION = 21
MODE_TRADEALLOWED = 22
MODE_MINLOT = 23
MODE_LOTSTEP = 24
MODE_MAXLOT = 25
MODE_SWAPTYPE = 26
MODE_PROFITCALCMODE = 27
MODE_MARGINCALCMODE = 28
MODE_MARGININIT = 29
MODE_MARGINMAINTENANCE = 30
MODE_MARGINHEDGED = 31
MODE_MARGINREQUIRED = 32
MODE_FREEZELEVEL = 33
MODE_CLOSEBY_ALLOWED = 34

SYMBOL_SELECT = 0
SYMBOL_VISIBLE = 76
SYMBOL_SESSION_DEALS = 56
SYMBOL_SESSION_BUY_ORDERS = 60
SYMBOL_SESSION_SELL_ORDERS = 62
SYMBOL_VOLUME = 10
SYMBOL_VOLUMEHIGH = 11
SYMBOL_VOLUMELOW = 12
SYMBOL_TIME = 15
SYMBOL_DIGITS = 17
SYMBOL_SPREAD_FLOAT = 41
SYMBOL_SPREAD = 18
SYMBOL_TRADE_CALC_MODE = 29
SYMBOL_TRADE_MODE = 30
SYMBOL_START_TIME = 51
SYMBOL_EXPIRATION_TIME = 52
SYMBOL_TRADE_STOPS_LEVEL = 31
SYMBOL_TRADE_FREEZE_LEVEL = 32
SYMBOL_TRADE_EXEMODE = 33
SYMBOL_SWAP_MODE= 37
SYMBOL_SWAP_ROLLOVER3DAYS = 40
SYMBOL_EXPIRATION_MODE = 49
SYMBOL_FILLING_MODE = 50
SYMBOL_ORDER_MODE = 71

SYMBOL_BID = 1
SYMBOL_BIDHIGH = 2
SYMBOL_BIDLOW = 3
SYMBOL_ASK = 4
SYMBOL_ASKHIGH = 5
SYMBOL_ASKLOW = 6
SYMBOL_LAST = 7
SYMBOL_LASTHIGH = 8
SYMBOL_LASTLOW = 9
SYMBOL_POINT = 16
SYMBOL_TRADE_TICK_VALUE = 26
SYMBOL_TRADE_TICK_VALUE_PROFIT = 53
SYMBOL_TRADE_TICK_VALUE_LOSS = 54
SYMBOL_TRADE_TICK_SIZE = 27
SYMBOL_TRADE_CONTRACT_SIZE = 28
SYMBOL_VOLUME_MIN = 34
SYMBOL_VOLUME_MAX = 35
SYMBOL_VOLUME_STEP = 36
SYMBOL_VOLUME_LIMIT = 55
SYMBOL_SWAP_LONG = 38
SYMBOL_SWAP_SHORT = 39
SYMBOL_MARGIN_INITIAL = 42
SYMBOL_MARGIN_MAINTENANCE = 43
SYMBOL_MARGIN_LONG = 44
SYMBOL_MARGIN_SHORT = 45
SYMBOL_MARGIN_LIMIT = 46
SYMBOL_MARGIN_STOP = 47
SYMBOL_MARGIN_STOPLIMIT = 48
SYMBOL_SESSION_VOLUME = 57
SYMBOL_SESSION_TURNOVER = 58
SYMBOL_SESSION_INTEREST = 59
SYMBOL_SESSION_BUY_ORDERS_VOLUME = 61
SYMBOL_SESSION_SELL_ORDERS_VOLUME = 63
SYMBOL_SESSION_OPEN = 64
SYMBOL_SESSION_CLOSE = 65
SYMBOL_SESSION_AW = 66
SYMBOL_SESSION_PRICE_SETTLEMENT = 67
SYMBOL_SESSION_PRICE_LIMIT_MIN = 68
SYMBOL_SESSION_PRICE_LIMIT_MAX = 69

SYMBOL_CURRENCY_BASE = 22
SYMBOL_CURRENCY_PROFIT = 23
SYMBOL_CURRENCY_MARGIN = 24
SYMBOL_DESCRIPTION = 20
SYMBOL_PATH = 21

SYMBOL_TRADE_MODE_DISABLED = 0
SYMBOL_TRADE_MODE_LONGONLY = 3
SYMBOL_TRADE_MODE_SHORTONLY = 4
SYMBOL_TRADE_MODE_CLOSEONLY = 1
SYMBOL_TRADE_MODE_FULL = 2

SYMBOL_TRADE_EXECUTION_REQUEST = 0
SYMBOL_TRADE_EXECUTION_INSTANT = 1
SYMBOL_TRADE_EXECUTION_MARKET = 2
SYMBOL_TRADE_EXECUTION_EXCHANGE = 3

SUNDAY = 0
MONDAY = 1
TUESDAY = 2
WEDNESDAY = 3
THURSDAY = 4
FRIDAY = 5
SATURDAY = 6

# https://docs.mql4.com/constants/indicatorconstants/lines
MODE_MAIN = 0
MODE_SIGNAL = 1

MODE_PLUSDI = 1
MODE_MINUSDI = 2

MODE_UPPER = 1
MODE_LOWER = 2

MODE_GATORJAW = 1
MODE_GATORTEETH = 2
MODE_GATORLIPS = 3

MODE_TENKANSEN = 1
MODE_KIJUNSEN = 2
MODE_SENKOUSPANA = 3
MODE_SENKOUSPANB = 4
MODE_CHIKOUSPAN = 5

# https://docs.mql4.com/constants/tradingconstants/enum_series_info_integer
SERIES_BARS_COUNT = 0
SERIES_FIRSTDATE = 1
SERIES_LASTBAR_DATE = 5
SERIES_SERVER_FIRSTDATE = 2


# https://docs.mql4.com/constants/chartconstants/enum_timeframes
PERIOD_CURRENT = 0
PERIOD_M1 = 1
PERIOD_M5 = 5
PERIOD_M15 = 15
PERIOD_M30 = 30
PERIOD_H1 = 60
PERIOD_H4 = 240
PERIOD_D1 = 1440
PERIOD_W1 = 10080
PERIOD_MN1 = 43200

PERIOD_M2 = 2
PERIOD_M3 = 3
PERIOD_M4 = 4
PERIOD_M6 = 6
PERIOD_M10 = 10
PERIOD_M12 = 12
PERIOD_M20 = 20
PERIOD_H2 = 120
PERIOD_H3 = 180
PERIOD_H6 = 360
PERIOD_H8 = 480
PERIOD_H12 = 720

# https://docs.mql4.com/constants/indicatorconstants/enum_ma_method
MODE_SMA = 0
MODE_EMA = 1
MODE_SMMA = 2
MODE_LWMA = 3

# https://docs.mql4.com/constants/indicatorconstants/prices#enum_applied_price_enum
PRICE_CLOSE = 0
PRICE_OPEN = 1
PRICE_HIGH = 2
PRICE_LOW = 3
PRICE_MEDIAN = 4
PRICE_TYPICAL = 5
PRICE_WEIGHTED = 6

# # https://docs.mql4.com/constants/objectconstants/webcolors
clrNONE = ""
clrBlack = "0-0-0"
clrDarkGreen = "0-100-0"
clrDarkSlateGray = "47-79-79"
clrOlive = "128-128-0"
clrGreen = "0-128-0"
clrTeal = "0-128-128"
clrNavy = "0-0-128"
clrPurple = "128-0-128"
clrMaroon = "128-0-0"
clrIndigo = "75-0-130"
clrMidnightBlue = "25-25-112"
clrDarkBlue = "0-0-139"
clrDarkOliveGreen = "85-107-47"
clrSaddleBrown = "139-69-19"
clrForestGreen = "34-139-34"
clrOliveDrab = "107-142-35"
clrSeaGreen = "46-139-87"
clrDarkGoldenrod = "184-134-11"
clrDarkSlateBlue = "72-61-139"
clrSienna = "160-82-45"
clrMediumBlue = "0-0-205"
clrBrown = "165-42-42"
clrDarkTurquoise = "0-206-209"
clrDimGray = "105-105-105"
clrLightSeaGreen = "32-178-170"
clrDarkViolet = "148-0-211"
clrFireBrick = "178-34-34"
clrMediumVioletRed = "199-21-133"
clrMediumSeaGreen = "60-179-113"
clrChocolate = "210-105-30"
clrCrimson = "220-20-60"
clrSteelBlue = "70-130-180"
clrGoldenrod = "218-165-32"
clrMediumSpringGreen = "0-250-154"
clrLawnGreen = "124-252-0"
clrCadetBlue = "95-158-160"
clrDarkOrchid = "153-50-204"
clrYellowGreen = "154-205-50"
clrLimeGreen = "50-205-50"
clrOrangeRed = "255-69-0"
clrDarkOrange = "255-140-0"
clrOrange = "255-165-0"
clrGold = "255-215-0"
clrYellow = "255-255-0"
clrChartreuse = "127-255-0"
clrLime = "0-255-0"
clrSpringGreen = "0-255-127"
clrAqua = "0-255-255"
clrDeepSkyBlue = "0-191-255"
clrBlue = "0-0-255"
clrMagenta = "255-0-255"
clrRed = "255-0-0"
clrGray = "128-128-128"
clrSlateGray = "112-128-144"
clrPeru = "205-133-63"
clrBlueViolet = "138-43-226"
clrLightSlateGray = "119-136-153"
clrDeepPink = "255-20-147"
clrMediumTurquoise = "72-209-204"
clrDodgerBlue = "30-144-255"
clrTurquoise = "64-224-208"
clrRoyalBlue = "65-105-225"
clrSlateBlue = "106-90-205"
clrDarkKhaki = "189-183-107"
clrIndianRed = "205-92-92"
clrMediumOrchid = "186-85-211"
clrGreenYellow = "173-255-47"
clrMediumAquamarine = "102-205-170"
clrDarkSeaGreen = "143-188-143"
clrTomato = "255-99-71"
clrRosyBrown = "188-143-143"
clrOrchid = "218-112-214"
clrMediumPurple = "147-112-219"
clrPaleVioletRed = "219-112-147"
clrCoral = "255-127-80"
clrCornflowerBlue = "100-149-237"
clrDarkGray = "169-169-169"
clrSandyBrown = "244-164-96"
clrMediumSlateBlue = "123-104-238"
clrTan = "210-180-140"
clrDarkSalmon = "233-150-122"
clrBurlyWood = "222-184-135"
clrHotPink = "255-105-180"
clrSalmon = "250-128-114"
clrViolet = "238-130-238"
clrLightCoral = "240-128-128"
clrSkyBlue = "135-206-235"
clrLightSalmon = "255-160-122"
clrPlum = "221-160-221"
clrKhaki = "240-230-140"
clrLightGreen = "144-238-144"
clrAquamarine = "127-255-212"
clrSilver = "192-192-192"
clrLightSkyBlue = "135-206-250"
clrLightSteelBlue = "176-196-222"
clrLightBlue = "173-216-230"
clrPaleGreen = "152-251-152"
clrThistle = "216-191-216"
clrPowderBlue = "176-224-230"
clrPaleGoldenrod = "238-232-170"
clrPaleTurquoise = "175-238-238"
clrLightGray = "211-211-211"
clrWheat = "245-222-179"
clrNavajoWhite = "255-222-173"
clrMoccasin = "255-228-181"
clrLightPink = "255-182-193"
clrGainsboro = "220-220-220"
clrPeachPuff = "255-218-185"
clrPink = "255-192-203"
clrBisque = "255-228-196"
clrLightGoldenrod = "250-250-210"
clrBlanchedAlmond = "255-235-205"
clrLemonChiffon = "255-250-205"
clrBeige = "245-245-220"
clrAntiqueWhite = "250-235-215"
clrPapayaWhip = "255-239-213"
clrCornsilk = "255-248-220"
clrLightYellow = "255-255-224"
clrLightCyan = "224-255-255"
clrLinen = "250-240-230"
clrLavender = "230-230-250"
clrMistyRose = "255-228-225"
clrOldLace = "253-245-230"
clrWhiteSmoke = "245-245-245"
clrSeashell = "255-245-238"
clrIvory = "255-255-240"
clrHoneydew = "240-255-240"
clrAliceBlue = "240-248-255"
clrLavenderBlush = "255-240-245"
clrMintCream = "245-255-250"
clrSnow = "255-250-250"
clrWhite = "255-255-255"
