[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 495

 
Slepoy >>:
У кого-нибудь есть скрипт или индикатор, показывающий историю торговли (прибыль и убыток )за определенный период по установленной на чарте валюте?
int i;
double profit=0;
for {i=OrdersHistoryTotal()-1;i>=0;i--)
   {
   OrderSelect(i,SELECT_BY_POS,MODE_HISTORY);
   if (OrderCloseTime()>=начальная_дата&&OrderCloseTime()<=конечная_дата&&OrderSymbol()==нужный_инструмент) profit=profit+OrderProfit();
   }
Comment ("Профит с",начальная_дата," по ",конечная_дата,"=",profit);

That's the whole script:) Stick it anywhere... You can run it in an Expert Advisor, in an indicator, or in a script.
 
I haven't found a direct answer to this question anywhere (maybe I searched wrong?):
Does the ArrayCopy() function copy elements into a new array or just redirects access?

(From the https://docs.mql4.com/ru/array/ArrayCopyRates helpline:
No real memory allocation for the data array and no copying takes place. When such an array is accessed, access is redirected).
 
Mathemat >>:
Нигде не нашел прямого ответа на такой вопрос (может, плохо искал?):
Функция ArrayCopy() копирует элементы в новый массив или просто перенаправляет доступ?

(Из хелпа к https://docs.mql4.com/ru/array/ArrayCopyRates:
Реального распределения памяти под массив данных и копирования не происходит. При обращении к такому массиву производится перенаправление доступа.)


It just bluntly copies... From one to the other. Element by element...
Roughly speaking, it does the same thing as if you were doing it element by element.
 
And ArrayCopyRates is a bit different... This function simply redirects access to an array of bars from the histories.
 
lexandros >>:

Вот и весь скрипт:) Втыкайте куда угодно... хоть в советник, хоть в индикатор. хоть прям скриптом запускайте.



Do I have to go into the code and enter the date every time?
 
lexandros >>:

Вот и весь скрипт:) Втыкайте куда угодно... хоть в советник, хоть в индикатор. хоть прям скриптом запускайте.



Do I have to go into the code and enter the date every time?
 
Slepoy >>:
И каждый раз лезть в код и вбивать там дату?

Classic.

 
Good afternoon to all.

I need an M5 quote history for any symbols "from the beginning". Where can I find it, who knows/seen it?
 
Slepoy >>:


И каждый раз лезть в код и вбивать там дату?


I don't know what date you want
Actually, it's set with external variables.
extern datetime desired_date=minute,year,day,century,millennium,geological epoch,number of ticks from christmas...

You were given a ready-made script... Use your brain a little...
 
NightShadow >>:
Доброго всем.

Нужна мне история котировок M5 по любым символам "с самого начала". Где такое нарыть можно, подскажите, кто знает/встречал?


The quote history is uploaded from MT itself. I haven't seen it as a file on the websites. But actually you can also export from MT...
In MT you go to settings... set the maximal possible number in parameter "number of bars in history".
Then go to quote archive - select required symbol and press download button...
Minutes will download... All other timeframes are based on them.
On the eurobucks, imho has been lingering since 1998... more than enough...
Reason: