[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 862
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
You wanted five minutes, didn't you?
That's the way it should work. Every 5 minutes there will be a redraw, if you zero the required parameters, which are used by the indicator.
extern int timedraw=1; - this is one minute
I have done what I wanted with your help. As for the ticks, they are not very regular, but not critical, they won't be used on the history - this is a script and indicator for manual trading
three screens, or rather 4
ZS: Your code - yes indeed it is more useful for writing an indicator to be used by the EA
Except that sometimes there are no ticks for three minutes, like now. Looking at GBPUSD M1 chart, there were no 3-4 minute ticks there. You cannot use TimeCurrent() on history. Or you cannot use it in the tester because it is the current time and it does not change.
Based on the code above, we can say that the message signal will not be every 5 minutes, but every 5 bars on the minutes.
Returns the server's last known time (last quoted time) as the number of seconds elapsed since 00:00 on January 1, 1970.
Note: In testing, the last known server time is simulated.
But still, is it simulated? Yes - it won't be accurate with a not insignificant margin of error I guess, but use on a test is possible. If there is something I don't know or don't understand, I would be grateful if you could explain.
I think you're wrong. Wait a minute...
Ah, I remembered, TimeCurrent() cannot be used when recalculating the history of the current graph.
For example, when the following code is currently attached
will remember the current real time, not the i-th bar where iHigh(NULL,0,i)>X
And in the tester I don't know.
I think you're wrong. Wait a minute...
Ah, I remembered, TimeCurrent() cannot be used when recalculating the history of the current graph.
For example, when the following code is currently attached
will remember the current real time, not the i-th bar where iHigh(NULL,0,i)>X
And in the tester I don't know.
I think you're wrong. Wait a minute...
Ah, I remembered, TimeCurrent() cannot be used when recalculating the history of the current graph.
For example, when the following code is currently attached
will remember the current real time, not the i-th bar where iHigh(NULL,0,i)>X
And in the tester I don't know.
Yes, it's clear. I was just confused by the phrase that TimeCurrent() cannot be used on the history and in the tester.
Won't the following code be incorrect? The time of arrival of the last quote is simulated and we use it.
Your solution seemed to me better than the one described above.
The following code won't be wrong?
int time; must be set higher than the start time, otherwise time will always equal zero. And it should be bracketed by(TimeCurrent()-time)
The rest of the code seems to be fine. Didn't check it.
what is the best way to save important data/variables in case the terminal hangs up (power failure)?
- global variables of the terminal? to a file?
- how often do they need to be saved? (the last equity value and some bools are important)