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

[FEATURE] Get the ATH of a symbol #12

Open
Romain1702 opened this issue Feb 16, 2021 · 2 comments
Open

[FEATURE] Get the ATH of a symbol #12

Romain1702 opened this issue Feb 16, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Romain1702
Copy link

Is your feature request related to a problem? Please describe.
I need to authentify the 2018 ATH of somes cryptos to see which one of them have still potential of big pump.

Describe the solution you'd like
A function to get ATH of a crypto available on binance

Thanks for your work ;)

@Romain1702 Romain1702 added the enhancement New feature or request label Feb 16, 2021
@ziggetty
Copy link

ziggetty commented Apr 8, 2021

some remarks for diego:

if binance does not have a function for the all time high, you can get the max of a range of running history bars.
for example you record the history high from the last 24 hours (initial you could get a few years of monthly history bars to get the ATH manual)
from this range you can get the max value. this max value can go up and down.
with a function to record the max , for example:

function recordMax() {
var sheet = SpreadsheetApp.getActiveSheet();
var range = sheet.getRange("A1:B1");
var values = range.getValues()[0];
range.setValues([[values[0], Math.max(values[0], values[1])]]);
}
this function is quite static, and the range a1:b1 should be flexible.
with this function you get in B1 the ATH, being A1 the max from your running history range
the function only places A1 in B1 if A1>B1

the script which call that function could run on an onedit trigger of cell change

simpler would be:
With the current relevant value in A1, A2 will retain the all-time highest value of A1 with this formula:
=max(A1,A2)
provided File > Spreadsheet settings..., Calculation has Iterative calculation set to On with Max. number of iterations set to 1

but that breaks other =binance functions , so not a viable option.

@ziggetty
Copy link

ziggetty commented May 7, 2021

another note : with such a recordmax function in the script you could in principle also keep track of the ATH of your own account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants