Skip to content

Commit 9347f31

Browse files
committed
pre-commit
1 parent 8948b14 commit 9347f31

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

examples_of_expert_advisor/fimathe/eurusd_fimathe.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
"""
2-
EURUSD FiMathe Expert Advisor for MetaTrader 5.
1+
"""EURUSD FiMathe Expert Advisor for MetaTrader 5.
32
43
This Expert Advisor uses Fibonacci retracement levels to determine entry and exit points.
54
"""
5+
66
import MetaTrader5 as Mt5
77
import numpy as np
88
from include.rates import Rates
@@ -74,11 +74,12 @@
7474

7575
if len(Mt5.positions_get(symbol=trade.symbol)) == 1 and (
7676
(
77-
Mt5.positions_get(symbol=trade.symbol)[0].type == 0 and
78-
tick.last > Mt5.positions_get(symbol=trade.symbol)[0].price_open + zone_236
79-
) or (
80-
Mt5.positions_get(symbol=trade.symbol)[0].type == 1 and
81-
tick.last < Mt5.positions_get(symbol=trade.symbol)[0].price_open - zone_236
77+
Mt5.positions_get(symbol=trade.symbol)[0].type == 0
78+
and tick.last > Mt5.positions_get(symbol=trade.symbol)[0].price_open + zone_236
79+
)
80+
or (
81+
Mt5.positions_get(symbol=trade.symbol)[0].type == 1
82+
and tick.last < Mt5.positions_get(symbol=trade.symbol)[0].price_open - zone_236
8283
)
8384
):
8485
trade.stop_loss = trade.sl_tp_steps

examples_of_expert_advisor/fimathe/win_fimathe.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
"""WIN FiMathe Expert Advisor for MetaTrader 5.
22
3-
This Expert Advisor is designed for WING21 futures, using Fibonacci retracement levels to
3+
This Expert Advisor is designed for WING21 futures, using Fibonacci retracement levels to
44
determine entry and exit points.
55
"""
6+
67
import MetaTrader5 as Mt5
78
import numpy as np
89
from include.rates import Rates
@@ -83,11 +84,12 @@
8384

8485
if len(Mt5.positions_get(symbol=trade.symbol)) == 1 and (
8586
(
86-
Mt5.positions_get(symbol=trade.symbol)[0].type == 0 and
87-
tick.last > Mt5.positions_get(symbol=trade.symbol)[0].price_open + zone_236
88-
) or (
89-
Mt5.positions_get(symbol=trade.symbol)[0].type == 1 and
90-
tick.last < Mt5.positions_get(symbol=trade.symbol)[0].price_open - zone_236
87+
Mt5.positions_get(symbol=trade.symbol)[0].type == 0
88+
and tick.last > Mt5.positions_get(symbol=trade.symbol)[0].price_open + zone_236
89+
)
90+
or (
91+
Mt5.positions_get(symbol=trade.symbol)[0].type == 1
92+
and tick.last < Mt5.positions_get(symbol=trade.symbol)[0].price_open - zone_236
9193
)
9294
):
9395
trade.stop_loss = trade.sl_tp_steps

0 commit comments

Comments
 (0)