Discussion of article "DoEasy. Controls (Part 31): Scrolling the contents of the ScrollBar control" - page 3
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
Wow, I drew the panel, I spent so much time. And it turns out that you can't create an Edit element...
Show me your fully compilable example, please.
Well, what is there to compile if there is no such object.
GRAPH_ELEMENT_TYPE_WF_RADIOBUTTON is there and many others, but there is no simple Edit. Through the engine method CreateEditField() I end up creating a field, but tell me how to bind it to the panel?
Well, what is there to compile if there is no such object.
There is GRAPH_ELEMENT_TYPE_WF_RADIOBUTTON and many others, but there is no simple Edit. Through the engine method CreateEditField() I end up creating a field, but tell me how to bind it to the panel?
The library is still under development. The graphical elements are less than half done. There is no input field yet. There is only a standard one, which you are trying to make.
When the "Input field" object will be available, then everything will work. It is not practical to bind a standard object to the form now - it will not participate in the event model of the form object.
Okay.
Also, this method is not working properly
It only returns me the last order. For some reason, when filtering orders, it treats them as deleted pending orders.
I'll just give you some input. The first order on the position was opened with a limiter (SELL STOP), there were several updates of the position by changing SL/TP. Then I caught an event of closing on SL. I am trying to find the first order of the closed position, but the method above is not working correctly.
Position ticket and position id are completely different things. You need to search by position ID, not by its ticket, which is constantly changing and becomes equal to the ticket of the order that generated the trade that changed the position.
You should read articles or help about the order system in MetaTrader 5....
On ClosePosition() you don't even fill in the filling at all
In Trading.mqh trade_obj.ClosePosition(ticket,comment,deviation)
trade_obj has the required filing, and going inside this.m_request.type_filling method becomes default FOK
trade_obj has the required filing, and going inside this.m_request.type_filling method becomes default FOK