Type/to search

【分享】-ATR为例均值计算中容错教程

Common strategy
Created: 2023-01-16 09:36:42
Last modified: 3 years ago
3
Follow
1011
Followers

为回馈FMZ平台与社区,进行策略&代码&思路&模板的分享

简介:
详细的均值计算步骤,以ATR为例。
包含指标调用、数据点不足容错、意外数据错误容错等细节
策略的重要是细节的把握。

欢迎合作交流,共同学习进步~
v:haiyanyydss

Source
JavaScript
var arecords = _C(exchange.GetRecords, 300);
var time = arecords[arecords.length - 1].Time
var nowtime = time;
var atremaarr = [];
var Onoff = 0;

function main() {
    while (true) {
        //这里开始    把这段放循环里   
        var Num = 50; //可以改,几根的平均值
        var records = _C(exchange.GetRecords, 300);
        var atr = TA.EMA(records, 9)
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)