The resource loading... loading...

How does the Parabolic SAR indicator in js use the Heiken Ashi k line?

Author: gzf445, Created: 2020-02-10 21:39:10, Updated:

The sar indicator uses the Heiken Ashi k-line, and after hours of research, the results are the same as the original k-line, because what limitations did the talib of the platform make? The smallest value has changed, why is the sar value the same? 2020-02-10 21:35:43 Information about sar2 9375.691019486052 This is a dynamic list and may never be able to satisfy particular standards for success. 2020-02-10 21:35:43 information sar1 9375.691019486052 This is a list of all the different ways Sar1 is credited in the database. 2020-02-10 21:35:43 Information 9346.08 9294.560000000001 This is a list of all the different ways 9346.08 9294.560000000001 is credited in the database. 2020-02-10 21:35:43 information 9346.08 9300 This is a list of all the different ways The World Is Not Enough is credited in the database.

function harecords (records) {

var harecords = []

for (var i = 0; i < records.length; i++) {
    if (i>0) {
        
    close=(records[i].High+records[i].Low+records[i].Open+records[i].Close)/4
    open=(records[i-1].Open+records[i-1].Close)/2
    high=Math.max(records[i].High,close,open)
    low=Math.min(records[i].Low,close,open)
        
        var currrecords = {
          Time : records[i].Time,
          Open : open,
          High : high,
          Low : low, 
          Close : close,                         
          Volume : records[i].Volume
        }
        }
       else { 
                    continue

           }
      harecords.push(currrecords)
      
    
        
    
}  

return harecords

}

function main (() { var records = exchange.GetRecords ((PERIOD_H1)); // can be filled in with different k-line cycles, such as PERIOD_M1, PERIOD_M30, PERIOD_H1...

  var harecords=harecords(records)
  var h=200
  Log(records[records.length-h].High,records[records.length-h].Low)
  Log(harecords[harecords.length-h].High,harecords[harecords.length-h].Low)
  
  var sar1=talib.SAR(records,0.015,0.2);
  var sar2=talib.SAR(harecords,0.015,0.2);
  Log('sar1',sar1[records.length-h])
  Log('sar2',sar2[harecords.length-h])

}


More

gzf445I looked it up in tradingview and it's the same thing. For some reason, I clicked it. Thank you.

The grassWell, Talib is using the official library, so there should be no problem.