MultiDataset Type

QuantScript's MultiDataset type is a container type.

Container types contain within them a single value of one of the following types: Number, Boolean, Day or Time.

A MultiDataset value can be only be created by combining two series that are linked to two different datasets.

[] Time travelling does not work on MultiDataset values - it always returns

unknown
.

Examples:

1 # Let's say this code executes in the context of a EURUSD:1h dataset
2 Tesla:1d teslaOneDayVolume = volume
3
4 # multiDatasetVolume is the sum of Tesla's 1-day volume and EURUSD's 1-hour volume
5 multiDatasetVolume = teslaOneDayVolume + volume
6
7 # this is unknown
8 previousMultiDatasetVolume = multiDatasetVolume[1]

Unary Operand Behaviour

Anything not listed here results in an Unknown

OperatorOperandResult
-MultiDataset<Number>MultiDataset<Number>
notMultiDataset<Boolean>MultiDataset<Boolean>
isknownMultiDataset<Any>MultiDataset<Boolean>

Binary Operand Behaviour

Anything not listed here results in an Unknown

Left OperandOperatorRight OperandResult
MultiDataset<Number>+, -, *, /, %, **, //NumberMultiDataset<Number>
MultiDataset<Number>+, -, *, /, %, **, //Series<Number>MultiDataset<Number>
MultiDataset<Number>+, -, *, /, %, **, //MultiDataset<Number>MultiDataset<Number>
MultiDataset<Number>>, >=, <, <=, ==, !=NumberMultiDataset<Boolean>
MultiDataset<Number>>, >=, <, <=, ==, !=Series<Number>MultiDataset<Boolean>
MultiDataset<Number>>, >=, <, <=, ==, !=MultiDataset<Number>MultiDataset<Boolean>
MultiDataset<Day>>, >=, <, <=, ==, !=DayMultiDataset<Boolean>
MultiDataset<Day>>, >=, <, <=, ==, !=Series<Day>MultiDataset<Boolean>
MultiDataset<Day>>, >=, <, <=, ==, !=MultiDataset<Day>MultiDataset<Boolean>
MultiDataset<Time>>, >=, <, <=, ==, !=TimeMultiDataset<Boolean>
MultiDataset<Time>>, >=, <, <=, ==, !=Series<Time>MultiDataset<Boolean>
MultiDataset<Time>>, >=, <, <=, ==, !=MultiDataset<Time>MultiDataset<Boolean>
MultiDataset<Boolean>and, orBooleanMultiDataset<Boolean>
MultiDataset<Boolean>and, orSeries<Boolean>MultiDataset<Boolean>
MultiDataset<Boolean>and, orMultiDataset<Boolean>MultiDataset<Boolean>
MultiDataset<Any>() Function callAnyError