2
Follow
0
Followers
Sebagai contoh, GetRecords() adalah untuk mendapatkan data baris K, dan TA.EMA untuk mendapatkan data baris rata, maka
var records = exchange.GetRecords(PERIOD_M15)
if (records && records.length > 12) {
var ema = TA.EMA(records, 12)
}
Kenapa K-line 15 minit boleh digunakan dalam 12 hari? apa maksudnya? terima kasih
Related Recommendations
How to Specify Different Versions of Data for the Rented Strategy by Its Rental Code MetadataAdvanced Tutorial for FMZ Quant platform Strategy WritingElementary Tutorial for FMZ Quant platform Strategy WritingGet Started with FMZ Quant PlatformSECURITY BUGI keep getting error: Exchange_GetAccount: Invalid ContractTypeWe have an incredibly profitable market making algorithm for sideways markets on Bitmex - but need expert to help eliminate wait times during downward volatility in the marketError with deribitLimitations of the backtesting engineHow to install ta-lib on linux docker?
Comment
All comments (2)
15分钟周期的K线, 这话没毛病. 但是那个12 不是12天, 哥们, 是12根K线, 一根K线代表15分钟. 没有足够的K线, 无法算EMA, var ema = TA.EMA(records, 12)
这个代码的变量名该改改,你就不容易疑惑了. 真正的意思是: var ema12 =TA.EMA(records, 12) // 这句代码就是算出EMA12 均线的值.
5 years ago
- 1