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
etc.
Here is the code in the EA (tried many functions to determine the equality of the indicator line 0)
I took the simplest one.
here we have the values of the indicator line here from the tester's log via print
there is no zero, but looking at the indicator - a clear zero - and in the values of
of the indicator is also zero.
what the hell?
This is the kind of nonsense that came up in the log after the update command was executed on the graph:
2011.02.03 02:24:51 HistoryBase '#IBM' 1 invalid bars removed
2011.02.03 02:24:50 HistoryBase '#IBM' 1 invalid bars removed
2011.02.03 02:24:49 HistoryBase '#IBM' 1 invalid bars removed
2011.02.03 02:24:48 HistoryBase '#IBM' 1 invalid bars removed
2011.02.03 02:24:47 HistoryBase '#IBM' 1 invalid bars removed
2011.02.03 02:24:46 HistoryBase '#IBM' 1 invalid bars removed
etc every second.
TF Sentry
only logs - the re-rating will not affect the performance of the Expert Advisor
etc.
Here is the code in the EA (tried many functions to determine the equality of the indicator line 0)
I took the simplest one.
here we have the values of the indicator line here from the tester's log via print
there is no zero, but looking at the indicator - a clear zero - and in the values of
of the indicator is also zero.
what the hell?
Have you forgotten to reverse the array?
Interesting, it turns out that the same Expert Advisor on different computers adds templates to the chart from different places:
on 1 computer from MetaTrader 5\Profiles\Templates
on 2 computer from MetaTrader 5\MQL5\Files
Adding line inChartApplyTemplate(handle_Chart, "Sova15_30.tpl")
What's up, who can help me figure it out?
Can you tell me how to get the time of the last position change?
Can you tell me how to get the time of the last position change?
Determine which trade on the symbol was the last one.
You can either catch it in OnTrade() or in the history.
https://www.mql5.com/ru/articles/138 find myposition.Time() there
This is how the time of position opening is returned, if I remember correctly (i.e. as far as I understand it will return the time of the first trade that opened the position).
As for the mentioned article, myhistory and mydeal may be useful(maybe something else will fit).
Determine which trade on the symbol was the last one.
You can either catch it in OnTrade() or in the history.
This is how the time of position opening is returned, if I remember correctly (i.e., as far as I understand it, the time of the first trade, which opened the position, is returned).Yes, this is the problem, i.e. it is necessary to find the last deal for the required instrument and obtain its time, but in an easier way?
Are you interested in a specific position (symbol and its Id are known) or the general case for all positions?
If you just look through the history and analyze deals (using mydeal), then approximately so:
1. Get the total number of deals for the period, going through them, selecting only those for the symbol / or those that participated in the formation of the position
2. it is better to select deals not by symbol, but by ID of a specific position (it's easier and more reliable).
Although I am sure there are more correct and simple solutions.