Skip to content

Commit 2f54c03

Browse files
committed
Pre-commit trade.py
1 parent 5ae1fcb commit 2f54c03

File tree

15 files changed

+421
-349
lines changed

15 files changed

+421
-349
lines changed

.codespell-ignore

Whitespace-only changes.

.github/workflows/deploy-semantic-release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Deploy | Semantic Release
22

33
on:
4-
push:
5-
branches: ['main']
4+
workflow_dispatch:
5+
66
jobs:
77
release:
88
runs-on: windows-latest

example.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
"""Example trading strategy using the MQL5-Python integration.
2+
This example demonstrates a Moving Average Crossover strategy.
3+
"""
4+
15
from mqpy.src.rates import Rates
26
from mqpy.src.tick import Tick
37
from mqpy.src.trade import Trade

examples_of_expert_advisor/example_sockets_connection.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
"""Example Expert Advisor demonstrating socket connections with MetaTrader 5.
2+
This example uses stochastic oscillator and moving average indicators to generate trading signals.
3+
"""
4+
15
import MetaTrader5 as Mt5
26
from include.indicator_connector import Indicator
37
from include.rates import Rates

examples_of_expert_advisor/fimathe/eurusd_fimathe.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
"""EURUSD FiMathe Expert Advisor for MetaTrader 5.
2+
This Expert Advisor uses Fibonacci retracement levels to determine entry and exit points.
3+
"""
4+
15
import MetaTrader5 as Mt5
26
import numpy as np
37
from include.rates import Rates

examples_of_expert_advisor/fimathe/win_fimathe.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
"""WIN FiMathe Expert Advisor for MetaTrader 5.
2+
This Expert Advisor is designed for WING21 futures, using Fibonacci retracement levels to determine entry and exit points.
3+
"""
4+
15
import MetaTrader5 as Mt5
26
import numpy as np
37
from include.rates import Rates

mqpy/__main__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""Main entry point for the MQL5-Python integration package."""
2+
13
from .template import main
24

35
if __name__ == "__main__":

mqpy/book.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Optional
1+
from typing import Any, Dict, Optional
22

33
import MetaTrader5 as Mt5
44

@@ -21,11 +21,11 @@ def __init__(self, symbol: str) -> None:
2121
else:
2222
print(f"Error adding {self.symbol} to the market book. Error: {Mt5.last_error()}")
2323

24-
def get(self) -> Optional[dict]:
24+
def get(self) -> Optional[Dict[str, Any]]:
2525
"""Get the market book for the financial instrument.
2626
2727
Returns:
28-
Optional[dict]: A dictionary representing the market book, or None if unsuccessful.
28+
Optional[Dict[str, Any]]: A dictionary representing the market book, or None if unsuccessful.
2929
"""
3030
return Mt5.market_book_get(self.symbol)
3131

0 commit comments

Comments
 (0)