Features of the mql5 language, subtleties and tricks - page 44
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
I do not understand anything, for some reason class CCanvas normally draws lines on the canvas only when you zoom in the graph, and when you reduce it drawn only the canvas itself, and the lines are not drawn:
I do not understand anything, for some reason class CCanvas normally draws lines on the canvas only when zoomed in the graph, and when you reduce it drawn only the canvas itself, and the lines are not drawn:
Don't post your code here, in case we will find the mistake.) A generation of clowns.
Found the problem, did not take into account when converting the coordinates of time / price in the pixel chart, referencing to the coordinates of the chart, should also lead to the coordinates of the canvas on which we draw ))
POSITION_TICKET may not be equal toPOSITION_IDENTIFIER only if there was a DEAL_ENTRY_INOUT(DEAL_ENTRY_OUT_BY)-trade.
If there was no such transaction, these position parameters will always match.
POSITION_TICKET may not be equal toPOSITION_IDENTIFIER only if there was a DEAL_ENTRY_INOUT(DEAL_ENTRY_OUT_BY)-trade.
If there was no such deal, these position parameters will always match.
Not true. I encountered that when activating a pending order, the ticket and ID do not coincide, even in the account tester.
Therefore, to obtain a list of orders and trades belonging to a position, you should always use the ID, not the position's ticket.
Wrong. I met that when you activate a pending order ticket and ID do not match, even in the tester of the account.
Code for the tester, please.
Therefore, we should always use the identifier, not the position ticker, to get the list of orders and transactions belonging to the position.
That was never the point. The point is something else:
How to determine the closing time of the previous day's market in the futures market in different variants of the current time interval:
1. we are in the interval Saturday - Sunday; we need close time of Friday evening trade session
2. in the interval of Monday-Friday closed market: we need the closing time of evening session Monday-Thursday
3. we are in the trading range Monday and we need to close time of evening trading session on Friday
4. in Tuesday - Friday trading interval and we need the closing time of the evening session Monday - Thursday
Maybe someone wrote a similar functionality, I do not want to reinvent the wheel ))
Code for the tester, please.
Take any code with opening pending orders and drive to the brink, someday you will be lucky.
Key word in my post
Forum on trading, automated trading systems and strategy testing
Peculiarities of mql5, tips and tricks
Alexey Viktorov, 2017.06.19 10:53
I've seen it,
To be more exact, it is vice versa:
If there was an INOUT-transaction, then 100% TICKET != IDENTIFIER.
This is indisputable. Although on the otherge accounts an INOUT trade is born by counter-closing.
And this is questionable. Very questionable, in fact.
At this point I bid you farewell. I have no right to prevent you from getting lost...
How to determine the closing time of the previous day's market in the futures market in different variants of the current time interval:
1. we are in the interval Saturday - Sunday; we need close time of the evening trading session on Friday
2. in the interval of Monday-Friday closed market: we need the closing time of evening session Monday-Thursday
3. we are in the trading range Monday and we need to close time of evening trading session on Friday
4. in Tuesday-Friday timeframe we need the closing time for Monday-Thursday evening sessions
Maybe someone wrote a similar functionality, I do not want to reinvent the wheel ))
Maybe this will do? It does not always show correctly in forex.