Questions from Beginners MQL5 MT5 MetaTrader 5 - page 879
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
Thank you.
What's wrong now?
I suggested starting with HistorySelectByPosition and you've shoved it somewhere deep into the ifs...
There can only be one position per symbol in a netting account. Get the position ID, get the list of trades involved in the formation of this position and count them by trade direction and order type.
Artyom, I'll repeat the question, please answer it:
Didn't see the question :)
Honestly - I don't remember, but I think it works in MT5 - doesn't it?
But in the tester I was putting the pending orders... And I worked with the mouse. But I may have got confused and I was working with the mouse on a real chart and using buttons in the tester...
I won't guess - I dismantled all my library to small screws about half a year ago, and I won't be able to check it quickly any more. I've postponed its rebuilding till about autumn. So, it's faster just to check work of event model OnChartEvent() in the tester. But I have not time for that yet - sorry :)
Didn't see the question :)
Honestly - I don't remember, but I think it works in MT5 - doesn't it?
But I've been putting the pending orders in the tester... And I worked with the mouse. But it may well be that I must have got confused and I was working with the mouse on a real chart and using buttons in the tester...
I won't guess - I dismantled all my library to small screws about half a year ago, and I won't be able to check it quickly any more. I have postponed its rebuild till about autumn. So, it's faster just to check work of event model OnChartEvent() in the tester. But I have not time for that yet - sorry :)
There's all the test code:
no response, unfortunately, in the tester. In the OnChartEvent() function. Called from the Expert Advisor.
The whole test code is there:
no response, unfortunately, in the tester. In the OnChartEvent() function.
I suggested to start with HistorySelectByPosition, but you shoved it somewhere deep into ifs...
In a netting account there can only be one position per symbol. Get the position ID, get the list of deals forming this position and count them by deal direction and order type.
I did, because I want to make a universal counting function, for netting and hedging, or is it impossible?
Is CHART_EVENT_MOUSE_MOVE=true set?
No, but this is unlikely to solve the problem, as ctrl, shift and other keys have been pressed... there was no reaction.
Stuck in because I want to make a universal counting function, for netting and hedging, or is that impossible?
It is possible. But the approaches are different, and they need to be properly planned first, rather than dumping everything into one line of code...
No, but this is unlikely to solve the problem, as ctrl, shift and other keys have been pressed... There was no reaction.
Anyway, I really don't have time to experiment right now - I've got my own stuff waiting to be done.
Maybe I really forgot about it. But I have set the time-limits in the tester. It is quite probable - just the same buttons. I also know that I set them with the mouse. But maybe on a live chart too...
Probably. But the approaches are different, and they need to be planned properly first, rather than dumping everything into one line of code...
So I'll do it separately, for now.
What did I miss?