Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NOVA-678: scanner_data: fix epsilon calculation in the pine #821

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion links/24h_volume.pine.link
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ plot(close24hChangeAbs, title = "24h_close_change_abs", style = plot.style_colum

// 24h close change
float close24hChange = na
if na(close24hChangeAbs) or close24hPrev == 0 or (close24hPrev < 0 and close > 0)
float close24hPrevToCompare = close24hPrev * 1e+36 // for comparing very small numbers since pine has limited precision (1e-10)
if na(close24hChangeAbs) or close24hPrevToCompare != 0 or (close24hPrevToCompare < 0 and close > 0)
Copy link
Contributor

@stimofeev-tv stimofeev-tv Dec 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

было ==, стало !=

na
else
close24hChange := (close24hChangeAbs / math.abs(close24hPrev)) * 100
Expand Down