anandanand84 / technicalindicators

A javascript technical indicators written in typescript with pattern recognition right in the browser
MIT License
2.12k stars 550 forks source link

Incorrect calculator SAR #235

Open trevisanweb opened 3 years ago

trevisanweb commented 3 years ago

hi i used SAR for calculator

when i comparison this number and SAR binance is incorrect

please help me

quanxufeng commented 3 years ago

I've met this problem too, so I would like to know how you'd fixed it. really appreciate for it

sivo1981 commented 2 years ago

Same with me. I think the starting point is the problem comparing with Tradingview pinescript where closing price is included.


    if bar_index == 1
        if close > close[1]
            isBelow := true
            maxMin := high
            result := low[1]
        else
            isBelow := false
            maxMin := low
            result := high[1]
        isFirstTrendBar := true
        acceleration := start