MQL4/.github/instructions/python-scripts.instructions.md
Rahul Dhangar 669ecde7b7 Initial commit: Documentation and MT4 EA Phases 1-3 complete
- Added comprehensive MQ4/MQ5 comparison documentation (60+ pages)
- Added MT4 EA implementation plan and tracking documents (60+ pages)
- Phase 1: Core infrastructure with input parameters and data structures
- Phase 2: Bar detection system for H4, M30, M15 timeframes
- Phase 3: Pattern detection logic (Regular/Irregular Buy/Sell patterns)
- Reference files: FINAL_H4_ZONES.mq4, MultiTimeframeZoneEA.mq5, Strategy.md
2025-11-04 01:38:41 +05:30

1.3 KiB

applyTo
**/*.py

Instructions for _Thivyam Python Scripts

  • Purpose: Python scripts are used for tasks like advanced back-testing, data analysis, machine learning model training, and generating reports from MetaTrader data.
  • Style: Follow the PEP 8 style guide for all Python code.
  • Libraries:
    • For data manipulation, use pandas.
    • For numerical operations, use numpy.
    • For plotting and visualization, use matplotlib or plotly.
  • Type Hinting: Use Python type hints for all function signatures to improve code clarity and maintainability.
  • Documentation: All functions and classes must have clear docstrings explaining their purpose, arguments, and return values.
  • Logging: Use the standardised _Thivyam logging helpers (import from thivyam.logging) or Python's logging module configured with UTC timestamps for reproducibility.
  • Configuration: Load credentials and environment-specific settings from .env files or OS-level secrets; never hardcode API keys.
  • Testing: Provide lightweight unit tests (pytest preferred) for data transforms, and include sample datasets when possible.
  • Agent Workflow: Include a short README.md in each script directory explaining inputs, outputs, and any scheduled automation so future agents can run them without guesswork.