File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed
examples_of_expert_advisor Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 11"""Expert Advisor examples for MetaTrader 5.
22
33This package contains example implementations of various trading strategies.
4- """
4+ """
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python
12"""Generate the API reference pages for the MQPy package."""
23
34import sys
You can’t perform that action at this time.
0 commit comments