The k-line seems to have a problem.

Author: jackma, Created: 2021-07-21 00:04:39, Updated:

The code is: a = exchanges[0].GetRecords ((3600)) Log ((a[-1]) The result: {Time buffer: 1612890000000, Open buffer: 46470.85, High buffer: 46470.85, Low buffer: 46470.85, Close buffer: 46470.85, Volume buffer: 0.0, Open Interest buffer: 0.0}

For some unknown reason, there is often a situation where the k-line is a point; this causes the algorithm to fail.


More

The SheepdogI tried a simple k-line policy a while ago and found a problem, and my solution was to sort by time every time I getRecord, and then add a single k-line time trial to see if it was the current k-line, and this solves the problem.

jackmaCalling for help

jackmaThe copyright owner, please help!

jackmaCalling for help

jackma /upload/asset/1d7272e0714cee33851b7.png /upload/asset/1d6a403d62dec7123a05f.png

jackmaMy friend and I have tried many times, using exchanges[0].GetRecords() to get a list of k-strings, where the last element has the same k-string value at four prices. This means that the most recent decline in the price of a k-string using GetRecords will be wrong.

The grassI don't know, the new k-line might just start out like this.

jackmaCalling for help

jackmagetrecod gets the k-string is not ordered?