[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 102
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
It is written in the tutorial:
If FILE_WRITE is not combined with FILE_READ, a file of zero length will be opened. Even if there was data in the file before it was opened, it will be destroyed. If you want to append data to an existing file, you have to open it using the FILE_READ | FILE_WRITE combination.
I use this
int handle=FileOpen(Symbol()+".csv",FILE_CSV|FILE_READ|FILE_WRITE,"\t");
I see in the file that there is always only the latest data, i.e. the information is overwritten. How can I make the information be added?
Pro, please advise how to do this: when the zero bar has just appeared and, respectively, the first value of the indicator that works on the zero bar, we need to fix this value, so that after closing the zero bar it remains the same as when it opens.
Let's save the time of the last bar opening in the variable Time[0]. If the value in this variable is not equal to the one in Time[0], it means that the first tick of the new bar has come. At this point, we store the value of our indicator on the zero bar. Then, as soon as the value in our variable is no longer equal to that in Time[0], the Expert Advisor will understand that a new bar has been reached again. At this point, it understands that the indicator variable contains the indicator value corresponding to the open point of the previous bar. It can use this value somehow and then return the indicator value to the indicator variable (it is a new candle and it is the first tick of a new candle).
It means that we should modify the indicator and make an EA? Can't you make a template and insert your indicator into it through icustom?
The indicator is not needed to send quotes into a text document. An Expert Advisor is enough. And vice versa, the Expert Advisor is not needed, if the indicator sends quotes to the text document.
The opening time of the current trading session can be obtained from:
- And how can we find out as accurately as possible the opening time of the next trading session, while we are still in the current one?
Thank you!
The opening time of the current trading session can be obtained from:iTime(NULL,PERIOD_D1,0)
- And how to get the most accurate information about the opening time of the next trading session, while we are still in the current one?
Thank you!
)))
But it obviously has nothing to do with "trading sessions".
)))
Except that it clearly has nothing to do with "trading sessions".
That's exactly what I'm applying now, but "it turned out" that there are shortened sessions and this solution pops into the next one, but not at the very beginning of it, but a bit further away. Maybe there's some other way?
Thanks!
This is exactly what I'm applying now, but "it turns out" that there are shortened sessions and this solution slips into the next one, but not at the very beginning of it, but a bit further on. Maybe there is some other way?
Thanks!