This is a list of all the different ways Var records = exchange.GetRecords ((PERIOD_M5);;
var macd = TA.MACD (records, 12, 26, 9);
Log ((
Inventors quantify - small dreamsYou can see this example of KDJ and MACD https://zhuanlan.zhihu.com/p/27300549 What's up? This is a list of all the different ways Var records = exchange.GetRecords ((PERIOD_M5);; var macd = TA.MACD (records, 12, 26, 9); Log (("DIF:", macd[0], "DEA:", macd[1], "MACD:", macd[2]); What's up? This macd two-dimensional array is the three indicator lines, macd[0][0], macd[1][0], macd[2][0] is the first point of the three lines, and the current macd three-line values are the corresponding macd[0][n], macd[1][n], macd[2][n] last data. The input line K is a 5-minute cycle when calculating MACD. The output line is the corresponding 5-minute MACD indicator.
only oilThe Dream of the Supergod
Inventors quantify - small dreamsIt is preferable to use the length of macd[0] to index macd[0][macd[0].length-1] as well as records.length-1 to index.
only oilSo if I were to write the problem like this, I'd write the problem like this, if I were to write the problem like this, I'd write the problem like this. var records = exchange.GetRecords ((PERIOD_M5)); var macd = TA.MACD (records, 12, 26, 9); if ((macd[0][records.length-1] > macd[1][records.length-1] && macd[0][records.length-1] - macd[1][records.length-1] > 5) { return "buy"; I'm not sure. if ((macd[0][records.length-1] < macd[1][records.length-1] && macd[0][records.length-1] - macd[1][records.length-1] < -5) { return "sell"; I'm not sure.
only oilThe Dream of the Weapon
Inventors quantify - small dreamsThe data is different, the 1 hour MACD and the 5 minute MACD are definitely different, and you can see from the charts of the exchanges that these indicators are calculated based on the K-line data, the K-line data from different cycles. The MACD is not well understood conceptually, you try to understand it using the mean line indicator, where the mean line is the average of a certain number of K-line columns closing prices (in general).
Inventors quantify - small dreamsThe measurement column in the MACD indicator is the dif - dea, which has twice the dif -dea, which is the value of the moment when a K-line bar is not running out. Any indicator is variable, including the MACD. You can observe that the MACD indicator value of the last K-line on the chart of the exchange may be 1 (as an example) and the next is -1 (as an example).
only oilWhether you select M5 or H1, the data is the same, just the data capacity is different. For example, if you select 1 hour line, then the data for the rest of the hour is mercilessly filtered out.
only oilI read the article and it was worth the time.
only oilThe value of the MACD column in the K-line chart of the exchange is either the last data at the time or the average over a period of time. So let's say I look at the K-string chart for five minutes, and the MACD column at 19 o'clock, its value is the average of all the data between 18:55 and 19 o'clock, or the value at 19 o'clock.