Hello,
I'm learning MQL and I'm stuck with a problem. It's simple but I'm just learning. I'd really appreciate the help.
I'm creating an EA that closes trades when prices reaches (in long) the last candle's low.
I'm trying to change this to do this when long (opposite when short):
- If price reaches current bar's low, then close trade (stop loss = current bar's low)
- If next candle closes positive with trade (that is blue in long, red in short), then close trade.
Can somebody help me?
Thanks in advance.
I'm learning MQL and I'm stuck with a problem. It's simple but I'm just learning. I'd really appreciate the help.
I'm creating an EA that closes trades when prices reaches (in long) the last candle's low.
I'm trying to change this to do this when long (opposite when short):
- If price reaches current bar's low, then close trade (stop loss = current bar's low)
- If next candle closes positive with trade (that is blue in long, red in short), then close trade.
Can somebody help me?
Thanks in advance.
Attached File(s)
EA-example.mq4
4 KB
|
195 downloads
Hard work and patience.