Yes. Your elses apply to your . . .
if (OrderSelect(
. . . so if your OrderSelect() fails you will get your Cat Cry
Yes. Your elses apply to your . . .
. . . so if your OrderSelect() fails you will get your Cat Cry
If you look closely, there are two 'if (OrderSelect(..' each with its own 'Cat Cry' sound maker. The idea is to notify the user that either one of the trades, is no longer exist (active trade). Due to stoploss or the routine was successful: the profitable trade closed and the losing one changed it's ticket number (happens on partial close event)
The problem is that when such event happens, the sound and alert part of the EA doesn't activated.
I looked for a reason but couldn't find any.
Can you explain that?
Thanks,
James
If you look closely, there are two 'if (OrderSelect(..' each with its own 'Cat Cry' sound maker. The idea is to notify the user that either one of the trades, is no longer exist (active trade). Due to stoploss or the routine was successful and the profitable closed and the losing one changed it's ticket number (happens on partial close event)
Select by ticket selects from either pool, you can't just specify MODE_TRADES, it's not valid, read the documentation.
"pool - Optional order pool index. Used when the selected parameter is SELECT_BY_POS. It can be any of the following values:"
You should check the OrderCloseTime() , if it's not zero then it's closed, "Open and pending orders close time is equal to 0."
There is a say: Every day that you learn something new, is a good day.
Thank you for making my day 'a good day'
James
There is a say: Every day that you learn something new, is a good day.
Thank you for making my day 'a good day'
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I releases 1 part of the losing trade against the money in the 'profitable' tradem. So the loss is covered with 'no damage' to the balance.
James