Skip to content

Commit f711e74

Browse files
committed
add shebang
1 parent c0e78a8 commit f711e74

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"""Expert Advisor examples for MetaTrader 5.
22
33
This package contains example implementations of various trading strategies.
4-
"""
4+
"""

examples_of_expert_advisor/fimathe/win_fimathe.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,17 @@
8282
trade.stop_loss = zone_382
8383
trade.take_profit = zone_618
8484

85-
if len(Mt5.positions_get(symbol=trade.symbol)) == 1:
86-
if (
85+
if len(Mt5.positions_get(symbol=trade.symbol)) == 1 and (
86+
(
8787
Mt5.positions_get(symbol=trade.symbol)[0].type == 0
8888
and tick.last > Mt5.positions_get(symbol=trade.symbol)[0].price_open + zone_236
89-
) or (
89+
)
90+
or (
9091
Mt5.positions_get(symbol=trade.symbol)[0].type == 1
9192
and tick.last < Mt5.positions_get(symbol=trade.symbol)[0].price_open - zone_236
92-
): # if Buy
93-
trade.stop_loss = trade.sl_tp_steps
93+
)
94+
):
95+
trade.stop_loss = trade.sl_tp_steps
9496

9597
trade.emergency_stop_loss = trade.stop_loss
9698
trade.emergency_take_profit = trade.take_profit

scripts/gen_ref_pages.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/env python
12
"""Generate the API reference pages for the MQPy package."""
23

34
import sys

0 commit comments

Comments
 (0)