dazamate:
Hey there, I want to close an order when 3 candles have closed in the stop loss area. It just seems like the logic is never true. I have other conditions for closing trades and they work fine. Here is my approach.
P.s The Print functions don't get printed.
If one of the 3 candles has closed below the SL of a Buy the likelihood is that the trade will have been closed by the SL.
One small point . . .
for(int tradecounter = OrdersTotal(); tradecounter >= 0 ; tradecounter--) // <--- shouldn't this start at OrdersTotal() - 1 ?
Raptor You make me look so stupid haha, It should be if 3 candles close under the Order open price.
Do you have to -1 of the total orders because there is an order at number 0? I get ya, I will make them changes.
Happy New Year Raptor!
dazamate:
Happy New year to you too . . . just happy to try and help. :-)
Happy New Year Raptor!
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hey there, I want to close an order when 3 candles have closed in the stop loss area. It just seems like the logic is never true. I have other conditions for closing trades and they work fine. Here is my approach.
P.s The Print functions don't get printed.