Indicator Connector
Python integration module for technical indicators.
This module provides a bridge between Python and MT5 indicators through socket connections.
Indicator #
A class for connecting to and retrieving data from MetaTrader 5 technical indicators.
This class provides methods to connect to various technical indicators in MetaTrader 5 through a socket connection. Each method corresponds to a specific technical indicator and returns its calculated values.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
address
|
str
|
The address to bind to. Defaults to "localhost". |
'localhost'
|
port
|
int
|
The port to bind to. Defaults to 9090. |
9090
|
listen
|
int
|
The number of connections to accept. Defaults to 1. |
1
|
Returns:
Type | Description |
---|---|
None
|
None |
Source code in mqpy\indicator_connector.py
accelerator_oscillator #
Calculate the Accelerator Oscillator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
accumulation_distribution #
Calculate the Accumulation/Distribution.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
applied_volume
|
int
|
The volume type for calculations. Defaults to 0. |
0
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
adaptive_moving_average #
adaptive_moving_average(symbol, time_frame=1, start_position=0, ama_period=9, fast_ma_period=2, slow_ma_period=30, applied_price=4)
Calculate the Adaptive Moving Average.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
ama_period
|
int
|
The period for the Adaptive Moving Average. Defaults to 9. |
9
|
fast_ma_period
|
int
|
The fast moving average period. Defaults to 2. |
2
|
slow_ma_period
|
int
|
The slow moving average period. Defaults to 30. |
30
|
applied_price
|
int
|
The price type for calculations. Defaults to 4. |
4
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
alligator #
alligator(symbol, time_frame=1, start_position=0, jaw_period=13, teeth_period=8, lips_period=5, ma_method=2, applied_price=4)
Calculate the Alligator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
jaw_period
|
int
|
The period for the Alligator's jaw. Defaults to 13. |
13
|
teeth_period
|
int
|
The period for the Alligator's teeth. Defaults to 8. |
8
|
lips_period
|
int
|
The period for the Alligator's lips. Defaults to 5. |
5
|
ma_method
|
int
|
The method for the Alligator's moving average. Defaults to 2. |
2
|
applied_price
|
int
|
The price type for calculations. Defaults to 4. |
4
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
average_directional_index #
Calculate the Average Directional Index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
period
|
int
|
The period for the Average Directional Index. Defaults to 14. |
14
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
average_directional_index_wilder #
Calculate the Average Directional Index Wilder.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
period
|
int
|
The period for the Average Directional Index Wilder. Defaults to 14. |
14
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
average_true_range #
Calculate the Average True Range.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
ma_period
|
int
|
The period for the Average True Range. Defaults to 14. |
14
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
awesome_oscillator #
Calculate the Awesome Oscillator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
bollinger_bands #
bollinger_bands(symbol, time_frame=1, period=20, start_position=0, ma_shift=0, deviation=2.0, applied_price=0)
Calculate the Bollinger Bands.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
period
|
int
|
The period for the Bollinger Bands. Defaults to 20. |
20
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
ma_shift
|
int
|
The shift for the moving average. Defaults to 0. |
0
|
deviation
|
float
|
The deviation for the Bollinger Bands. Defaults to 2.000. |
2.0
|
applied_price
|
int
|
The price type for calculations. Defaults to 0. |
0
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
bears_power #
Calculate the Bears Power.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
ma_period
|
int
|
The period for the Bears Power. Defaults to 13. |
13
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
bulls_power #
Calculate the Bulls Power.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
ma_period
|
int
|
The period for the Bulls Power. Defaults to 13. |
13
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
chaikin_oscillator #
chaikin_oscillator(symbol, time_frame=1, start_position=0, fast_ma_period=3, slow_ma_period=10, ma_method=1, applied_volume=0)
Calculate the Chaikin Oscillator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
fast_ma_period
|
int
|
The period for the fast moving average. Defaults to 3. |
3
|
slow_ma_period
|
int
|
The period for the slow moving average. Defaults to 10. |
10
|
ma_method
|
int
|
The method for the moving average. Defaults to 1. |
1
|
applied_volume
|
int
|
The volume type for calculations. Defaults to 0. |
0
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
commodity_channel_index #
Calculate the Commodity Channel Index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 1. |
1
|
ma_period
|
int
|
The period for the Commodity Channel Index. Defaults to 14. |
14
|
applied_price
|
int
|
The price type for calculations. Defaults to 0. |
0
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
demarker #
Calculate the DeMarker.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
period
|
int
|
The period for the DeMarker. Defaults to 14. |
14
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
double_exponential_moving_average #
double_exponential_moving_average(symbol, time_frame=1, start_position=0, ma_period=14, applied_price=0)
Calculate the Double Exponential Moving Average.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
ma_period
|
int
|
The period for the Double Exponential Moving Average. Defaults to 14. |
14
|
applied_price
|
int
|
The price type for calculations. Defaults to 0. |
0
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
envelopes #
envelopes(symbol, time_frame=1, start_position=0, ma_period=14, ma_method=0, applied_price=1, deviation=0.1)
Calculate the Envelopes.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
ma_period
|
int
|
The period for the Envelopes. Defaults to 14. |
14
|
ma_method
|
int
|
The method for the Envelopes. Defaults to 0. |
0
|
applied_price
|
int
|
The price type for calculations. Defaults to 1. |
1
|
deviation
|
float
|
The deviation for the Envelopes. Defaults to 0.100. |
0.1
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
force_index #
Calculate the Force Index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
ma_period
|
int
|
The period for the Force Index. Defaults to 13. |
13
|
ma_method
|
int
|
The method for the Force Index. Defaults to 0. |
0
|
applied_volume
|
int
|
The volume type for calculations. Defaults to 0. |
0
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
fractal_adaptive_moving_average #
fractal_adaptive_moving_average(symbol, time_frame=1, start_position=0, ma_period=14, applied_price=0)
Calculate the Fractal Adaptive Moving Average.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
ma_period
|
int
|
The period for the Fractal Adaptive Moving Average. Defaults to 14. |
14
|
applied_price
|
int
|
The price type for calculations. Defaults to 0. |
0
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
fractals #
Calculate the Fractals.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
gator_oscillator #
gator_oscillator(symbol, time_frame=1, start_position=0, jaw_period=13, jaw_shift=8, teeth_period=8, teeth_shift=5, lips_period=5, lips_shift=3, ma_method=2, applied_price=4)
Calculate the Gator Oscillator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
jaw_period
|
int
|
The period for the jaw. Defaults to 13. |
13
|
jaw_shift
|
int
|
The shift for the jaw. Defaults to 8. |
8
|
teeth_period
|
int
|
The period for the teeth. Defaults to 8. |
8
|
teeth_shift
|
int
|
The shift for the teeth. Defaults to 5. |
5
|
lips_period
|
int
|
The period for the lips. Defaults to 5. |
5
|
lips_shift
|
int
|
The shift for the lips. Defaults to 3. |
3
|
ma_method
|
int
|
The method for the moving average. Defaults to 2. |
2
|
applied_price
|
int
|
The price type for calculations. Defaults to 4. |
4
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 |
|
ichimoku_kinko_hyo #
ichimoku_kinko_hyo(symbol, time_frame=1, start_position=0, tenkan_sen=9, kijun_sen=26, senkou_span_b=52)
Calculate the Ichimoku Kinko Hyo.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
tenkan_sen
|
int
|
The period for the Tenkan-sen. Defaults to 9. |
9
|
kijun_sen
|
int
|
The period for the Kijun-sen. Defaults to 26. |
26
|
senkou_span_b
|
int
|
The period for the Senkou Span B. Defaults to 52. |
52
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
macd #
macd(symbol, time_frame=1, fast_ema_period=12, slow_ema_period=26, signal_period=9, start_position=0, applied_price=0)
Calculate the Moving Average Convergence Divergence.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
fast_ema_period
|
int
|
The period for the fast EMA. Defaults to 12. |
12
|
slow_ema_period
|
int
|
The period for the slow EMA. Defaults to 26. |
26
|
signal_period
|
int
|
The period for the signal line. Defaults to 9. |
9
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
applied_price
|
int
|
The price type for calculations. Defaults to 0. |
0
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
market_facilitation_index #
Calculate the Market Facilitation Index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
applied_volume
|
int
|
Volume type to use in calculations. Defaults to 0 (VOLUME_TICK). |
0
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
momentum #
Calculate the Momentum.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
mom_period
|
int
|
The period for the Momentum. Defaults to 14. |
14
|
applied_price
|
int
|
The price type for calculations. Defaults to 0. |
0
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
money_flow_index #
Calculate the Money Flow Index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
ma_period
|
int
|
The period for the Money Flow Index. Defaults to 14. |
14
|
applied_volume
|
int
|
The volume type for calculations. Defaults to 0. |
0
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
moving_average #
Calculate the Moving Average.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
period
|
int
|
The period for the Moving Average. Defaults to 20. |
20
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
method
|
int
|
The method for the Moving Average. Defaults to 0. |
0
|
applied_price
|
int
|
The price type for calculations. Defaults to 0. |
0
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 |
|
moving_average_of_oscillator #
moving_average_of_oscillator(symbol, time_frame=1, start_position=0, fast_ema_period=12, slow_ema_period=26, macd_sma_period=9, applied_price=0)
Calculate the Moving Average of Oscillator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
fast_ema_period
|
int
|
The period for the fast EMA. Defaults to 12. |
12
|
slow_ema_period
|
int
|
The period for the slow EMA. Defaults to 26. |
26
|
macd_sma_period
|
int
|
The period for the MACD SMA. Defaults to 9. |
9
|
applied_price
|
int
|
The price type for calculations. Defaults to 0. |
0
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
obv #
Calculate the On Balance Volume.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
applied_volume
|
int
|
The volume type for calculations. Defaults to 0. |
0
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
parabolic_sar #
Calculate the Parabolic SAR.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
step
|
float
|
The step for the Parabolic SAR. Defaults to 0.02. |
0.02
|
maximum
|
float
|
The maximum for the Parabolic SAR. Defaults to 0.2. |
0.2
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
relative_strength_index #
Calculate the Relative Strength Index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
ma_period
|
int
|
The period for the Relative Strength Index. Defaults to 14. |
14
|
applied_price
|
int
|
The price type for calculations. Defaults to 0. |
0
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
relative_vigor_index #
Calculate the Relative Vigor Index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
ma_period
|
int
|
The period for the Relative Vigor Index. Defaults to 10. |
10
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
standard_deviation #
standard_deviation(symbol, time_frame=1, start_position=0, ma_period=20, ma_method=0, applied_price=0)
Calculate the Standard Deviation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
ma_period
|
int
|
The period for the Standard Deviation. Defaults to 20. |
20
|
ma_method
|
int
|
The method for the Standard Deviation. Defaults to 0. |
0
|
applied_price
|
int
|
The price type for calculations. Defaults to 0. |
0
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 |
|
stochastic #
stochastic(symbol, time_frame=1, k_period=5, d_period=3, slowing=3, start_position=0, method=0, applied_price=0)
Calculate the Stochastic.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
k_period
|
int
|
The period for the Stochastic. Defaults to 5. |
5
|
d_period
|
int
|
The period for the Stochastic. Defaults to 3. |
3
|
slowing
|
int
|
The slowing for the Stochastic. Defaults to 3. |
3
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
method
|
int
|
The method for the Stochastic. Defaults to 0. |
0
|
applied_price
|
int
|
The price type for calculations. Defaults to 0. |
0
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 |
|
triple_exponential_ma_oscillator #
triple_exponential_ma_oscillator(symbol, time_frame, start_position=0, count=100, ma_period=14, applied_price=0)
Calculate the Triple Exponential Moving Average Oscillator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. |
required |
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
count
|
int
|
Number of elements to calculate. Defaults to 100. |
100
|
ma_period
|
int
|
Moving average period. Defaults to 14. |
14
|
applied_price
|
int
|
Price type to use in calculations. Defaults to 0 (PRICE_CLOSE). |
0
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
triple_exponential_moving_average #
triple_exponential_moving_average(symbol, time_frame=1, start_position=0, ma_period=14, applied_price=0)
Calculate the Triple Exponential Moving Average.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
ma_period
|
int
|
The period for the Triple Exponential Moving Average. Defaults to 14. |
14
|
applied_price
|
int
|
The price type for calculations. Defaults to 0. |
0
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
variable_index_dynamic_average #
variable_index_dynamic_average(symbol, time_frame=1, start_position=0, cmo_period=9, ema_period=12, applied_price=0)
Calculate the Variable Index Dynamic Average.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
cmo_period
|
int
|
The period for the CMO. Defaults to 9. |
9
|
ema_period
|
int
|
The period for the EMA. Defaults to 12. |
12
|
applied_price
|
int
|
The price type for calculations. Defaults to 0. |
0
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
volumes #
Calculate the Volumes.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
applied_volume
|
int
|
The volume type for calculations. Defaults to 0. |
0
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |
Source code in mqpy\indicator_connector.py
williams_percent_range #
Calculate the Williams Percent Range.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
The financial instrument symbol. |
required |
time_frame
|
int
|
The time frame for calculations. Defaults to 1. |
1
|
start_position
|
int
|
Starting position for calculations. Defaults to 0. |
0
|
calc_period
|
int
|
The period for the Williams Percent Range. Defaults to 14. |
14
|
Returns:
Type | Description |
---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The calculated values if successful, None otherwise. |