Skip to content

Commit 8948b14

Browse files
committed
pre-commit
1 parent f711e74 commit 8948b14

File tree

3 files changed

+17
-18
lines changed

3 files changed

+17
-18
lines changed

examples_of_expert_advisor/fimathe/eurusd_fimathe.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
"""EURUSD FiMathe Expert Advisor for MetaTrader 5.
1+
"""
2+
EURUSD FiMathe Expert Advisor for MetaTrader 5.
23
34
This Expert Advisor uses Fibonacci retracement levels to determine entry and exit points.
45
"""
5-
66
import MetaTrader5 as Mt5
77
import numpy as np
88
from include.rates import Rates
@@ -72,15 +72,16 @@
7272
trade.stop_loss = zone_236
7373
trade.take_profit = zone_618
7474

75-
if len(Mt5.positions_get(symbol=trade.symbol)) == 1:
76-
if (
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
75+
if len(Mt5.positions_get(symbol=trade.symbol)) == 1 and (
76+
(
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
7979
) or (
80-
Mt5.positions_get(symbol=trade.symbol)[0].type == 1
81-
and tick.last < Mt5.positions_get(symbol=trade.symbol)[0].price_open - zone_236
82-
): # if Buy
83-
trade.stop_loss = trade.sl_tp_steps
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
82+
)
83+
):
84+
trade.stop_loss = trade.sl_tp_steps
8485

8586
trade.emergency_stop_loss = trade.stop_loss + zone_236
8687
trade.emergency_take_profit = trade.take_profit + zone_236

examples_of_expert_advisor/fimathe/win_fimathe.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
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-
76
import MetaTrader5 as Mt5
87
import numpy as np
98
from include.rates import Rates
@@ -84,12 +83,11 @@
8483

8584
if len(Mt5.positions_get(symbol=trade.symbol)) == 1 and (
8685
(
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
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
9391
)
9492
):
9593
trade.stop_loss = trade.sl_tp_steps

scripts/gen_ref_pages.py

100644100755
File mode changed.

0 commit comments

Comments
 (0)