Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 169

 
yosuf:
Dear programmers, could you please tell me why when I rebooted my computer again, when I opened the terminal instead of a normal chart I saw a grey window, and the open positions, advisor, indicators disappeared, but when I opened a new chart, the positions appeared, but there were no advisor and indicators, I had to install them again. What has this got to do with it? I have had to install them again. Thank you.

Did they physically disappear from your disk? I don't think so. It's probably just the current template that's gone. Probably even the lack of a template.
 
Sepulca:

Have they physically disappeared from your drive? I don't think so. Probably just the current template is gone. More accurately, probably even the lack of template.
I had to re-call the chart, install the Expert Advisor and indicators, set them to the previous mode and everything worked as usual, because open positions, balance, funds, ..., were preserved. Maybe I should have searched for my previous profile in the service settings? Or was it useless? Checked the disk the terminal is sitting on, I thought it was full, no, it's full of free space. Calling the terminal from the drive didn't help either. In short, all 4 available chart profiles were lost along with advisor and indicators. The only thing that helped was reinstalling the chart. The reason is still not clear.
 
yosuf:
Dear programmers, could you please tell me why when I rebooted my computer again, when I opened the terminal instead of a normal chart I saw a grey window and lost the open positions, EA, indicators, but when I opened a new chart, the positions appeared, but there were no EA and indicators, I had to install them again. What has this got to do with it? Thank you.
This situation is possible if the terminal (which is missing) is running as a service (i.e. it is running without GUI). Look in Task Manager for unidentified terminal.exe processes
 
TarasBY:
This situation is possible if the terminal (which is missing) is running as a service (i.e. it is running without a GUI). Look in Task Manager for unidentified terminal.exe processes

What's the reason for not starting correctly? I will try again on Saturday to stop and restart the terminal. Will it repeat again? I will write back here, thank you for your attention, thank you.
 
Hello. When a pending order triggers, I write a line with the time and slippage into the file.
handle=FileOpen("проскальзывание.csv",FILE_CSV|FILE_READ|FILE_WRITE,';');
FileSeek(handle, 0, SEEK_END);
FileWrite( handle,TimeToStr(TimeCurrent(), TIME_DATE|TIME_MINUTES|TIME_SECONDS),text,symbol,Magic, проскальзывание) ;
FileClose(handle);

Next, when an order is closed, its profit should be added to the same line.

So far I have only managed to write it in a new line

handle=FileOpen("проскальзывание.csv",FILE_CSV|FILE_READ|FILE_WRITE,';');
FileSeek(handle, 0, SEEK_END);
FileWrite( handle,TimeToStr(TimeCurrent(), TIME_DATE|TIME_MINUTES|TIME_SECONDS),Profit) ;
FileClose(handle);
Can you tell me how to write in the same line.
 
Close it, open it as a binary, back 2 characters from the end, and write it (remembering the semicolon), then be sure to add those two characters. There end of file is written (EOF). Something like this. I have no time to lay out the code, go ahead yourself.
 

Gentlemen, let me ask the question again.

How to pull quotes from the database for each bar? Eventually they should be summed for each bar and divided by the volume to find the value of the average quote for the bar. This is needed to make a true average line indicator.

We can add Buffer1[i]=(Close[i]+Open[i]+High[i]+Low[i])/4; and find something in average, but it is not so exact.

Please give me the direction of the search.


 
VladislavVG:


Try running it this way:

See what the logs will say.


Ok, I'll try, but it will be a couple of days before the error is reproduced, because as I said before, the problem only exists in real conditions. In parallel run a branch where I changed the condition in the trawl:

   if ((bars_n<1) || (indent<0) || (ticket==0) || ((tmfrm!=1) && (tmfrm!=5) && (tmfrm!=15) && (tmfrm!=30) && (tmfrm!=60) && (tmfrm!=240) && (tmfrm!=1440) && (tmfrm!=10080) && (tmfrm!=43200)))
I thought it might be a problem that the order was being reselected, so I removed the selection. I will report back with the results.
 
Often you need to move a number of lines to the right by a few characters.
Is it possible to do this in one go in MetaEditor, or only the old-fashioned way, line by line?
 
Guys, help with the indicator please p.167
Reason: