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
This commit is contained in:
Kunthawat Greethong
2026-01-04 17:35:14 +07:00
parent d79bf572ef
commit 28a4546cd8
9 changed files with 1278 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
@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