CafeF_Indices_Vietstock
store Ticker !csvLine
store Date !csvLine
store Basic !csvLine
store Open !csvLine
store High !csvLine
store Low !csvLine
store Close !csvLine
store Volume !csvLine
store Value !csvLine
store Ceiling !csvLine
store Floor !csvLine
csvSave Trading_HOSE #DeleteAfterExport
executeScript d=new Date(); m=((d.getMonth()+1)<10)?'0'+(d.getMonth()+1):(d.getMonth()+1); return m+"/"+d.getDate() + "/" + d.getFullYear(); d1
executeScript d=new Date(); var m=((d.getMonth()+1)<10)?'0'+(d.getMonth()+1):(d.getMonth()+1); var dd=d.getDate(); if (dd<10) {dd='0'+dd;} return dd+"."+m+"."+d.getFullYear(); d2
open https://finance.vietstock.vn/ket-qua-giao-dich?exchange=2&tab=thong-ke-gia&code=-18
pause 3000
store HNX-INDEX !csvLine
store ${d1} !csvLine
storeText xpath=//*[@id="statistic-price"]/table/tbody/tr[1]/td[4] !csvLine
storeText xpath=//*[@id="statistic-price"]/table/tbody/tr[1]/td[5] !csvLine
storeText xpath=//*[@id="statistic-price"]/table/tbody/tr[1]/td[7] !csvLine
storeText xpath=//*[@id="statistic-price"]/table/tbody/tr[1]/td[8] !csvLine
storeText xpath=//*[@id="statistic-price"]/table/tbody/tr[1]/td[6] !csvLine
open https://hnx.vn/co-phieu-etfs/du-lieu-thi-truong-ny-quy-mo.html
pause 20000
click xpath=//*[@id="end"]
pause 10000
storeText xpath=//*[@id="_tableDatas"]/tbody/tr[last()]/td[8]/span HNX_Vol1
storeText xpath=//*[@id="_tableDatas"]/tbody/tr[last()]/td[9]/span HNX_Val1
storeText xpath=//*[@id="_tableDatas"]/tbody/tr[last()]/td[10]/span HNX_Vol2
storeText xpath=//*[@id="_tableDatas"]/tbody/tr[last()]/td[11]/span HNX_Val2
executeScript return Number (${HNX_Vol1}.replace(/[^0-9]/g,'')); HNX_Vol1a
executeScript return Number (${HNX_Vol2}.replace(/[^0-9]/g,'')); HNX_Vol2a
executeScript return Number (${HNX_Val1}.replace(/[^0-9]/g,'')); HNX_Val1a
executeScript return Number (${HNX_Val2}.replace(/[^0-9]/g,'')); HNX_Val2a
executeScript return (${HNX_Vol1a}+${HNX_Vol2a}) !csvLine
executeScript return (${HNX_Val1a}+${HNX_Val2a}) !csvLine
store 1500 !csvLine
store 50 !csvLine
csvSave Trading_HOSE #DeleteAfterExport
open https://finance.vietstock.vn/ket-qua-giao-dich?exchange=5&tab=thong-ke-gia&code=-15
pause 3000
store HNX30-INDEX !csvLine
store ${d1} !csvLine
storeText xpath=//*[@id="statistic-price"]/table/tbody/tr[1]/td[4] !csvLine
storeText xpath=//*[@id="statistic-price"]/table/tbody/tr[1]/td[5] !csvLine
storeText xpath=//*[@id="statistic-price"]/table/tbody/tr[1]/td[7] !csvLine
storeText xpath=//*[@id="statistic-price"]/table/tbody/tr[1]/td[8] !csvLine
storeText xpath=//*[@id="statistic-price"]/table/tbody/tr[1]/td[6] !csvLine
open https://hnx.vn/co-phieu-etfs/du-lieu-thi-truong-ny-quy-mo.html
select xpath=//*[@id="cboIndex"] label=HNX30
click xpath=//*[@id="btn_search"]
pause 20000
click xpath=//*[@id="end"]
pause 10000
storeText xpath=//*[@id="_tableDatas"]/tbody/tr[last()]/td[8]/span HNX30_Vol1
storeText xpath=//*[@id="_tableDatas"]/tbody/tr[last()]/td[9]/span HNX30_Val1
storeText xpath=//*[@id="_tableDatas"]/tbody/tr[last()]/td[10]/span HNX30_Vol2
storeText xpath=//*[@id="_tableDatas"]/tbody/tr[last()]/td[11]/span HNX30_Val2
executeScript return Number (${HNX30_Vol1}.replace(/[^0-9]/g,'')); HNX30_Vol1a
executeScript return Number (${HNX30_Vol2}.replace(/[^0-9]/g,'')); HNX30_Vol2a
executeScript return Number (${HNX30_Val1}.replace(/[^0-9]/g,'')); HNX30_Val1a
executeScript return Number (${HNX30_Val2}.replace(/[^0-9]/g,'')); HNX30_Val2a
executeScript return (${HNX30_Vol1a}+${HNX30_Vol2a}) !csvLine
executeScript return (${HNX30_Val1a}+${HNX30_Val2a}) !csvLine
store 1500 !csvLine
store 50 !csvLine
csvSave Trading_HOSE #DeleteAfterExport
open https://finance.vietstock.vn/ket-qua-giao-dich?exchange=3&tab=thong-ke-gia&code=-17
pause 3000
store UPCOM-INDEX !csvLine
store ${d1} !csvLine
storeText xpath=//*[@id="statistic-price"]/table/tbody/tr[1]/td[4] !csvLine
storeText xpath=//*[@id="statistic-price"]/table/tbody/tr[1]/td[5] !csvLine
storeText xpath=//*[@id="statistic-price"]/table/tbody/tr[1]/td[7] !csvLine
storeText xpath=//*[@id="statistic-price"]/table/tbody/tr[1]/td[8] !csvLine
storeText xpath=//*[@id="statistic-price"]/table/tbody/tr[1]/td[6] !csvLine
open https://hnx.vn/co-phieu-etfs/du-lieu-thi-truong-uc-quy-mo.html
pause 20000
click xpath=//*[@id="end"]
pause 10000
storeText xpath=//*[@id="_tableDatas"]/tbody/tr[last()]/td[8]/span UPCOM_Vol1
storeText xpath=//*[@id="_tableDatas"]/tbody/tr[last()]/td[9]/span UPCOM_Val1
storeText xpath=//*[@id="_tableDatas"]/tbody/tr[last()]/td[10]/span UPCOM_Vol2
storeText xpath=//*[@id="_tableDatas"]/tbody/tr[last()]/td[11]/span UPCOM_Val2
executeScript return Number (${UPCOM_Vol1}.replace(/[^0-9]/g,'')); UPCOM_Vol1a
executeScript return Number (${UPCOM_Vol2}.replace(/[^0-9]/g,'')); UPCOM_Vol2a
executeScript return Number (${UPCOM_Val1}.replace(/[^0-9]/g,'')); UPCOM_Val1a
executeScript return Number (${UPCOM_Val2}.replace(/[^0-9]/g,'')); UPCOM_Val2a
executeScript return (${UPCOM_Vol1a}+${UPCOM_Vol2a}) !csvLine
executeScript return (${UPCOM_Val1a}+${UPCOM_Val2a}) !csvLine
store 1500 !csvLine
store 50 !csvLine
csvSave Trading_HOSE #DeleteAfterExport
open https://finance.vietstock.vn/ket-qua-giao-dich?exchange=1&tab=thong-ke-gia&code=-19
pause 3000
store VNINDEX !csvLine
store ${d1} !csvLine
storeText xpath=//*[@id="statistic-price"]/table/tbody/tr[1]/td[4] !csvLine
storeText xpath=//*[@id="statistic-price"]/table/tbody/tr[1]/td[5] !csvLine
storeText xpath=//*[@id="statistic-price"]/table/tbody/tr[1]/td[7] !csvLine
storeText xpath=//*[@id="statistic-price"]/table/tbody/tr[1]/td[8] !csvLine
storeText xpath=//*[@id="statistic-price"]/table/tbody/tr[1]/td[6] !csvLine
open https://www.hsx.vn/Modules/Rsde/Report/ReportTradingView?fid=ed26ccb5486840afaf4399be59cee98d
pause 5000
type id=dateFrom ${d2}
type id=dateTo ${d2}
click link=Xem kết quả
pause 10000
storeText xpath=//*/table[@id="summary-grid"]/*/tr[@id="Khối lượng giao dịch (100CK)"]/td[2] VNIndexVol1
storeText xpath=//*/table[@id="summary-grid"]/*/tr[@id="Giá trị giao dịch (triệu đồng)"]/td[2] VNIndexValue1
executeScript return Number (${VNIndexVol1}.replace(/[^0-9]/g,'')); VNIndexVol1a
executeScript return Number (${VNIndexValue1}.replace(/[^0-9]/g,'')); VNIndexValue1a
executeScript return (${VNIndexVol1a}) !csvLine
executeScript return (${VNIndexValue1a}*10000) !csvLine
store 1600 !csvLine
store 50 !csvLine
csvSave Trading_HOSE #DeleteAfterExport
open https://finance.vietstock.vn/ket-qua-giao-dich?exchange=4&tab=thong-ke-gia&code=-16
pause 3000
store VN30INDEX !csvLine
store ${d1} !csvLine
storeText xpath=//*[@id="statistic-price"]/table/tbody/tr[1]/td[4] !csvLine
storeText xpath=//*[@id="statistic-price"]/table/tbody/tr[1]/td[5] !csvLine
storeText xpath=//*[@id="statistic-price"]/table/tbody/tr[1]/td[7] !csvLine
storeText xpath=//*[@id="statistic-price"]/table/tbody/tr[1]/td[8] !csvLine
storeText xpath=//*[@id="statistic-price"]/table/tbody/tr[1]/td[6] !csvLine
open https://www.hsx.vn/Modules/Rsde/Report/ReportHoseView/?fid=1d5c3f7ee10b4479990effb374242650
pause 5000
type id=dateFrom ${d2}
type id=dateTo ${d2}
click link=Xem kết quả
pause 20000
storeText xpath=//*/table[@id="summary-grid"]/*/tr[@id="Khối lượng giao dịch (100CK)"]/td[2] VN30Vol1
storeText xpath=//*/table[@id="summary-grid"]/*/tr[@id="Giá trị giao dịch (triệu đồng)"]/td[2] VN30Value1
executeScript return Number (${VN30Vol1}.replace(/[^0-9]/g,'')); VN30Vol1a
executeScript return Number (${VN30Value1}.replace(/[^0-9]/g,'')); VN30Value1a
executeScript return (${VN30Vol1a}) !csvLine
executeScript return (${VN30Value1a}*10000) !csvLine
store 1600 !csvLine
store 50 !csvLine
csvSave Trading_HOSE #DeleteAfterExport
localStorageExport Trading_HOSE.csv #DeleteAfterExport