Type/to search
Built-in Functions
Global
Log
Market
Trade
Account
Futures
Exchange
IO
Network
Storage
Threads
TA
Talib
Overlap Studies
Momentum Indicators
Volume Indicators
Volatility Indicators
Cycle Indicators
Price Transform
Statistic Functions
Math Transform
Math Operators
talib.ADD
talib.DIV
talib.MAX
talib.MAXINDEX
talib.MIN
talib.MININDEX
talib.MINMAX
talib.MINMAXINDEX
talib.MULT
talib.SUB
talib.SUM
Pattern Recognition
OS
Structures
Built-in Variables and Constants
Conventions
Exchanges

Multiplies two arrays element by element (Vector Arithmetic Mult).

talib.MULT(inReal0, inReal1)

Examples

Multiply the close price of each K-line by its volume.

javascript
function main() { var records = exchange.GetRecords() if (!records) return // close price multiplied by volume var closes = records.map(function(r) { return r.Close }) var volumes = records.map(function(r) { return r.Volume }) var ret = talib.MULT(closes, volumes) Log(ret) }
python
import talib def main(): records = exchange.GetRecords() if not records: return # close price multiplied by volume ret = talib.MULT(records.Close, records.Volume) Log(ret)

Returns

TypeDescription

numeric array

Results, the same length as the input.

Arguments

NameTypeRequiredDescription

inReal0

numeric array

Yes

First series.

inReal1

numeric array

Yes

Second series; it must have the same length as inReal0.

See Also

Remarks

TA-Lib equivalent: MULT(Array(inReal0),Array(inReal1)) = Array(outReal).

Calculates inReal0[i] * inReal1[i] element by element.

In JavaScript, both inputs must be numeric arrays (extract a field from the K-line data with map first): if a K-line array is passed, both inputs take the close price of the same K-line data and the result is meaningless; arrays of different lengths raise an error.