The resource loading... loading...

Problems with simulated retesting

Author: running666, Created: 2018-05-15 23:38:39, Updated:

Write a simple program that logically should get the K-line data every hour and then display it in the log; for example, if I run a retest at 0, it should display the log at 1, 2, or 3, but why is the log time in my retest not an integer?img img img


More

Inventors quantify - small dreamsYes, you set the consultation Sleep interval to a certain time. The program executes a loop, but in addition, GetRecords These function calls are time-expended, including other function calls, although the time may be small, but it is not negligible in the actual run, after running a certain time, the time of output logs will be pushed forward.

Inventors quantify - small dreamsThis is not necessarily the problem, it has to be a combination of strategy, code, analysis.

running666This is my understanding. Because the missing k-line data of 1 minute in the range is relatively severe, the bottom k-line selected for 1 minute cannot successfully simulate tick generated data, so no backtest logs will be generated; The k-line absence rate is less severe for periods larger than 1 minute in the range, so it is possible to generate good analog tick data, so backtest logs are generated. I don't know if that's true or not.

running666The test code is the same as it was at the beginning. def main (: while True: kList = exchange.GetRecords ((PERIOD_H1)) is the name of the file. Log ((kList[-1]) Sleep (((3600000) is the name of the game

Inventors quantify - small dreamsThis is your test code.

running666Thank you. There is one more question. Or the strategy code above, I'm going to retest the time selection. I did two experiments, one where the bottom k-line was selected for 1 minute, and the other where the bottom k-line was selected for 15 minutes. Why is there no log output in the case of 1 minute and log data every 1 hour from November 1 to November 16 in the case of 15 minutes? https://dn-filebox.qbox.me/3f2017ddb9b336d278c065e3021b8c3e4b1ee191.png https://dn-filebox.qbox.me/b59599c9b43890fa6da5dad449d41c1d890ngdn1.png https://dn-filebox.qbox.me/6f0b8d0018ba6d54c7941f2f3605debd735043.png https://dn-filebox.qbox.me/7f94b9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9

Inventors quantify - small dreamsThis cannot be guaranteed, because there is a delay when you request data, this must have an error time, and it is unlikely to be 100% complete at that time.

running666OK, thank you. Is there a way to get my program to run on the whole, like get k-string data at the whole of 1, 2, or 3?