Type/to search
8
Follow
0
Followers
Em relação à precisão do cálculo de ATR da biblioteca de indicadores TA quantitativos do Inventor?
Help
Created 2023-02-28 16:22:30  Updated 2023-02-28 16:28:27
 2
 1271
python
def ma_case(self): exchange.SetContractType("swap") r = exchange.GetRecords(PERIOD_M1) ma = TA.MA(r, 20) Log(f'ma => {ma[-1]}, {ma[-2]}') def atr_case(self): exchange.SetContractType("swap") r = exchange.GetRecords(PERIOD_M1) atr = TA.ATR(r, 14) Log(f'atr => {atr[-1]}, {atr[-2]}')

2023-02-28 16:20:39 Informações atr => 12.161116665558945, 12.042741024448038
2023-02-28 16:20:39 Informações ma => 23246.1, 23244.699999999997

Os dados da binance para o mesmo período:
ATR 14 => 17.78
MA 20 => 23247

Mas, por que é que os dados do atr são mais ruins do que os de ma?

Related Recommendations
Comment
All comments (2)

    多试了几次ma的数据一直比较准,atr差的确实有点多。

    3 years ago

    一般要首先确定对比的K线数据完全一致,然后检查指标参数是否一致,最后如果还有差异就需要检查指标算法是否一致。有些平台虽然指标名称一样,但是可能算法有差异。

    3 years ago
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)