This repository has been archived on 2026-01-12. You can view files and clone it, but cannot push or open issues or pull requests.
Files
MeanRevisionEA/oi_scraper/run_scraper.bat
Kunthawat Greethong 28a4546cd8 feat(oi): add open interest scraper module
add new oi_scraper directory for collecting open interest data
and update the main EA to integrate with the scraper functionality
2026-01-04 17:35:14 +07:00

48 lines
1.6 KiB
Batchfile

@echo off
REM ==========================================
REM CME OI Scraper - Automatic Daily Runner
REM ==========================================
REM Change to script directory
cd /d C:\Users\YourUsername\Gitea\MeanRevisionEA\oi_scraper
echo ==========================================
echo CME OI Scraper - Daily Update
echo ==========================================
echo Started at: %date% %time%
echo ========================================== >> scraper.log
REM Run Python scraper
python main.py >> scraper.log 2>&1
REM Check if scraper succeeded
if %ERRORLEVEL% EQU 0 (
echo [%date% %time%] Scraper completed successfully >> scraper.log
REM Check if CSV file was created
if exist oi_data.csv (
echo [%date% %time%] CSV file created successfully >> scraper.log
REM Copy to MetaTrader 5 Files directory
REM Update this path to your actual MT5 directory
copy oi_data.csv "C:\Users\YourUsername\AppData\Roaming\MetaQuotes\Terminal\[Your_Terminal_ID]\MQL5\Files\oi_data.csv"
if %ERRORLEVEL% EQU 0 (
echo [%date% %time%] CSV copied to MT5 Files directory >> scraper.log
) else (
echo [%date% %time%] ERROR: Failed to copy CSV to MT5 directory >> scraper.log
)
) else (
echo [%date% %time%] WARNING: oi_data.csv not found >> scraper.log
)
) else (
echo [%date% %time%] ERROR: Scraper failed with error code %ERRORLEVEL% >> scraper.log
)
echo ==========================================
echo Completed at: %date% %time%
echo ==========================================
REM Keep window open for 5 seconds to see any errors
timeout /t 5