brianleect / binance-pump-alerts

Tracks prices of pairs on binance and notifies when price movements based on pre-defined parameters are met.
142 stars 42 forks source link

[QOL] TPD Nearest Hour #50

Closed brianleect closed 3 years ago

brianleect commented 3 years ago

Default initializes TPD start time to nearest hour.

Should fix 0% issue at the same time as well since nearest hour would act as a buffer. (Although not the original intention, it's interesting how it happens to fix the issue)

brianleect commented 3 years ago

Will try running this version overnight and if it works fine will merge it in the morning.

brianleect commented 3 years ago

image

Logs also show how long before the start time is considered for the TPD

brianleect commented 3 years ago

Will probably need to look at the modification related to the docker files to add this new parameter.

brianleect commented 3 years ago

image

Based on testing so far, 0% for first TPD is fixed as expected.

Once there's no issue with the docker side, should be able to merge this PR.

patbaumgartner commented 3 years ago

Why don't you call the setting topReportNearestHour: True it would be way more consistent with the current code.

You should also add the search & replace in the entrypoint.sh which is straight forward especially you can take it over from DEBUG. Adding it to the docker-compose.yml is not needed.