talib.CDL2CROWS
The talib.CDL2CROWS() function is used to calculate Two Crows (K-line pattern - Two Crows).
talib.CDL2CROWS(inPriceOHLC)Examples
javascript
function main() {
var records = exchange.GetRecords()
var ret = talib.CDL2CROWS(records)
Log(ret)
}
python
import talib
def main():
records = exchange.GetRecords()
ret = talib.CDL2CROWS(records.Open, records.High, records.Low, records.Close)
Log(ret)
c++
void main() {
auto records = exchange.GetRecords();
auto ret = talib.CDL2CROWS(records);
Log(ret);
}Returns
| Type | Description |
array | The |
Arguments
| Name | Type | Required | Description |
inPriceOHLC |
| Yes | The |
Remarks
The CDL2CROWS() function is described in the talib library documentation as: CDL2CROWS(Records[Open,High,Low,Close]) = Array(outInteger)
For calls in Python language, the parameter passing method is different and needs to be passed according to the above description: Records[Open,High,Low,Close].
For example, split a variable records (i.e., parameter inPriceOHLC, type Record structure array) into:
Open list: represented as records.Open in Python.
High list: represented as records.High in Python.
Low list: represented as records.Low in Python.
Close list: represented as records.Close in Python.
Calling method in Python strategy code:
talib.CDL2CROWS(records.Open, records.High, records.Low, records.Close)
The calling methods for other talib indicators are similar and will not be repeated.