Hello all,I'm trying to get the TICK_FLAG_BUY and TICK_FLAG_SELL information from 'flags' in MqlTick struct provided by the CopyTicks fuction on a custom indicator but it seems I never get that information from this function.
The Symbol I'm testing it has Times & Sales enabled and this information can be seen in the transaction table in Depth of Market window, where buy transactions are in blue and sell transactions in pink. But I can't get this information with the CopyTicks function.Am I missing something here?Thanks for the attention.Regards,Leonardo
Here is my code:
It's the OnCalculate function of my custom indicator. It should work, shouldn't it?I get all flags on my string, except the BUY and SELL ones.Thanks again,Leonardo
I get all flags on my string, except the BUY and SELL ones.Thanks again,Leonardo
I wonder why this information is available at the Depth of Market window (at the transaction list) but not via CopyTicks function...
Also tried with stocks and also on the broker's MT5 demo account but no success.
Anyway, I'll contact my broker service and I'll inform you as soon as I get an answer.Regards
I've got an answer from my broker today.
They said they didn't have someone internally that could help me and that they had to contact a 3rd party programmer to analyse the problem. So the programmer only said that those Buy and Sell flags indeed don't work and that what programmers usually do is to compare the last price with tick's Bid and Ask. If >=Ask then it's a Buy, if <=Bid it's a Sell.
Indeed it seems to be an alternative solution, although I didn't test it yet.
But why TICK_FLAG_BUY and TICK_FLAG_SELL don't work on that broker remains a mystery of the universe...