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
Something like this.
Sorry as I said I am novice.
I read about struct MqlTick. There we can find all the information about last trade.
But something is not clear for me; how to code to find: "WAS LAST TRADE A BUY OR A SELL"
Well, hope to find a solution !
And one more specification: Is not about a trade in the past.
I want to use the code in an expert advisor, so I want to know in real time : "was the last trade a buy or a sell ?".
You have to check the deals and find the last one : see here for an example of processing the deals.
Sorry again. My question is about how to code in mql5 language the following question: "Last trade in market was a buy or a sell?"
Thank you for your suggestion.I read the example. But how can I find the last deal ?
Compare the dates (DEAL_TIME) and keep the greater.
Thank you again! But don't you think is easier to use the MqlTick structure and code something like:
Thank you again! But don't you think is easier to use the MqlTick structure and code something like:
If the last trade was made during the last tick . . . then yes. When was the last trade made ?
Perhaps there are some crossed wires in this thread . . . . Are you talking about all trades or just the trades you have placed ?