For example, the current robot is a 1-minute cycle, how to calculate the value of the average line MA ((5) of the daytime cycle at this 1 point? Use this API. GetRecords ((Period)) Returns a K-line history, a K-line cycle specified when the bot was created, Record array structure Without parameters, returns the default K-line cycle when adding the robot's exponent, but can also customize K-line cycle Supported: PERIOD_M1 is 1 minute, PERIOD_M5 is 5 minutes, PERIOD_M15 is 15 minutes, PERIOD_M30 is 30 minutes, PERIOD_H1 is 1 hour, PERIOD_D1 is a day The value of the 5 K-strings in this line is the value of the current 1 minute level taken by the loop, so in 1 minute, the daily line MA ((5) is wrong. I don't know how to do it, gentlemen, gods, help me see.
momoxIt's a bit of a twist, I don't understand, if daylight MA is using GetRecords ((PREIOD_D1) to calculate, it doesn't matter what cycle your robot is.
Inventors quantify - small dreamsThe last element of the array of objects (the last column of the K-line) is always in flux, unless the cycle is completely completed, and the last value is uncertain if it is a day cycle, but today is not over.
wsnragI mean, the current robot is a 1-minute scale, and it cycles with Sleep ((1000), rec=GetRecords ((PREIOD_D1) and then uses ma ((rec,5) to calculate the 5th parallel of the day line, which actually takes 5 day K lines to calculate, and at the 1-minute scale the array taken is the value after the same day Sleep ((1000); so the extraction is wrong, I don't know if I got it wrong or it can't be taken on its own, it should be theoretically possible.