The resource loading... loading...

talib.CDL2CROWS

The talib.CDL2CROWS() function is used to calculate Two Crows (K-line chart - Two Crows).

The return value of the talib.CDL2CROWS() function is a one-dimensional array. array

talib.CDL2CROWS(inPriceOHLC)

The inPriceOHLC parameter is used to specify the K-line data. inPriceOHLC true {@struct/Record Record} structure array

function main() {
    var records = exchange.GetRecords()
    var ret = talib.CDL2CROWS(records)
    Log(ret)
}
import talib
def main():
    records = exchange.GetRecords()
    ret = talib.CDL2CROWS(records.Open, records.High, records.Low, records.Close)
    Log(ret)
void main() {
    auto records = exchange.GetRecords();
    auto ret = talib.CDL2CROWS(records);
    Log(ret);
}

The CDL2CROWS() function is described in the talib library documentation as: CDL2CROWS(Records[Open,High,Low,Close]) = Array(outInteger) For calls in the Python language, passing parameters is different and needs to be based on the above description: Records[Open,High,Low,Close].

Example of splitting a variable records (i.e. parameter inPriceOHLC, type {@struct/Record Record} array of structures) into: Open list: written in Python as records.Open. High list: written as records.High in Python. Low list: written in Python as records.Low. Close list: written in Python as records.Close.

Called in Python strategy code:

talib.CDL2CROWS(records.Open, records.High, records.Low, records.Close)

The other talib indicators are described in the same way and they will not be repeated.

TA talib.CDL3BLACKCROWS