This commit is contained in:
David Brazda
2023-05-09 12:13:02 +02:00
parent 16ee5c9f3d
commit 9dd5ff3e73
4 changed files with 21 additions and 5 deletions

17
testy/testRushHours.py Normal file
View File

@ -0,0 +1,17 @@
from v2realbot.utils.utils import is_open_rush, zoneNY
from datetime import datetime, date, timedelta, time
ted = datetime.now().astimezone(zoneNY)
ted = datetime(year=2023, month=5, day=9, hour=9, minute=35, tzinfo=zoneNY)
print(ted)
rush = is_open_rush(ted, 30)
print(rush)
business_hours = {
"from": time(hour=9, minute=30),
"to": time(hour=16, minute=0)
}
rushtime = (datetime.combine(date.today(), business_hours["from"]) + timedelta(minutes=30)).time()
print(rushtime)

View File

@ -337,7 +337,9 @@ $(document).ready(function () {
row = stratinRecords.row('.selected').data(); row = stratinRecords.row('.selected').data();
window.$('#runModal').modal('show'); window.$('#runModal').modal('show');
$('#bt_from').val(localStorage.getItem("bt_from")); $('#bt_from').val(localStorage.getItem("bt_from"));
//console.log(localStorage.getItem("bt_from"))
$('#bt_to').val(localStorage.getItem("bt_to")); $('#bt_to').val(localStorage.getItem("bt_to"));
//console.log(localStorage.getItem("bt_to"))
$('#mode').val(localStorage.getItem("mode")); $('#mode').val(localStorage.getItem("mode"));
$('#account').val(localStorage.getItem("account")); $('#account').val(localStorage.getItem("account"));
$('#debug').val(localStorage.getItem("debug")); $('#debug').val(localStorage.getItem("debug"));

View File

@ -1,9 +1,6 @@
function populate_real_time_chart() { function populate_real_time_chart() {
if (chart !== null) { cleanup_chart()
chart.remove();
clear_status_header();
}
initialize_chart() initialize_chart()
intitialize_candles() intitialize_candles()

View File

@ -86,7 +86,7 @@ function cleanup_chart() {
avgBuyLine = null avgBuyLine = null
volumeSeries = null volumeSeries = null
vwapSeries = null vwapSeries = null
if (toolTip !== null) { if (toolTip) {
toolTip.style.display = 'none'; toolTip.style.display = 'none';
} }
} }