Questions from a "dummy" - page 90

 
Dmido:

Sorry to repeat myself, but I've been browsing the mql4 and mql5 forums for days now and I can't find anything.

Question: How can I upload my history from MT4 to MT5? In my tester and in the trading terminal...

Please help, because all my work on my Expert Advisor has become...

You do not need to do it manually.
 
sergeev:
why write the type a second time?

? I mean.

I wanted instead of a cumbersome recording like this:

//+------------------------------------------------------------------+
//| ARRAY_OBJECTS                                                    |
//+------------------------------------------------------------------+
Something_Value
   Object_01_01,Object_01_02,Object_01_03,
   Object_02_01,Object_02_02,Object_02_03,
   Object_03_01,Object_03_02,Object_03_03,
   Object_04_01,Object_04_02,Object_04_03,
   Object_05_01,Object_05_02,Object_05_03,
   Object_06_01,Object_06_02,Object_06_03;

//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
   Initilization_Objects_Class();
  }
//---
void Initilization_Objects_Class()
  {   
   Object_01_01.Init(0,1); Object_01_01.Init(0,2); Object_01_01.Init(0,3);
   Object_02_01.Init(1,1); Object_02_01.Init(1,2); Object_02_01.Init(1,3);
   Object_03_01.Init(2,1); Object_03_01.Init(2,2); Object_03_01.Init(2,3);
   Object_04_01.Init(3,1); Object_04_01.Init(3,2); Object_04_01.Init(3,3);
   Object_05_01.Init(4,1); Object_05_01.Init(4,2); Object_05_01.Init(4,3);
   Object_06_01.Init(5,1); Object_06_01.Init(5,2); Object_06_01.Init(5,3);
  }
...to use an array.
 
tol64:

? I mean.

I wanted instead of a cumbersome recording like this:

...use an array.

...
Something_Value Objects[6][3];

...
for(int j=2; j>=0; j--)
        {
         Something_Value Objects[i][j].Init(i,j);
        }
     }
...

remove the second declaration ;)

 
ilunga:

remove the second ad ;)

))) Shit. Thanks. Alex made me think and I failed the exam. Also on such a small thing. ))
 
Konstantin83:
MT5 uploads and checks the history by itself, you don't need to upload anything by hand.
That's the point! I used to be able to slip some file into MT4 with my own history... Now I can't. I have not got Alpari quotes for MT5 yet, at least not for a couple of pairs, and they will probably differ much from the real pairs, how can I use the ones that are used in MT4 on a real account.... Can I create my own server and send quotes from it or they cannot be reproduced outside MetaQuotes?
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация о счете
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация о счете
  • www.mql5.com
Стандартные константы, перечисления и структуры / Состояние окружения / Информация о счете - Документация по MQL5
 
Dmido:
...how to download the ones used in MT4 on a real account....

you can read from a file and draw it with an indicator. it will look the same as the native chart.

 

Am I correct in assuming that it is ideologically wrong to try to implement:

CopyBuffer(ind_handle,0,0,amount,Buffer);

ifBuffer was linked as:

SetIndexBuffer(0,Buffer,INDICATOR_CALCULATIONS);
and not as INDICATOR_DATA?
 
joo:

You can read from a file and draw with an indicator. it will look the same as the native chart.

Thanks for the tip I will use it as one of the options, but I actually used MT5 because of the multicurrency tester, so I don't know how to use MT4 history in the tester...
 
x100intraday:

Am I correct in assuming that it is ideologically wrong to try to implement:

ifBuffer was linked as:

and not as INDICATOR_DATA?

See examples of how to use this function, at least here - https://www.mql5.com/ru/docs/series/copybuffer

This function is designed to access indicator buffers externally by its handle, not inside the indicator itself.
Документация по MQL5: Доступ к таймсериям и индикаторам / CopyBuffer
Документация по MQL5: Доступ к таймсериям и индикаторам / CopyBuffer
  • www.mql5.com
Доступ к таймсериям и индикаторам / CopyBuffer - Документация по MQL5
 
Rosh:

See examples of how to use this function, at least here - https://www.mql5.com/ru/docs/series/copybuffer

This function is designed to access indicator buffers externally by its handle, not inside the indicator itself.

After reading the answer, I had a slightly different insight. However, I was asking about the joint using of the above functions and exactly that identifier inside one custom indicator under development (though involving the handle of another indicator, which wasn't the base of the question). That's why the question was left unanswered, because the link above made something else clear.

What I was interested in, I found here (I couldn't find something like that in the help): http://zulman.googlecode.com/svn/trunk/MT5/Indicators/ColorCandles.mq5. Whether or not it is correct to combine in your indicator what I was asking about, but in this example it is practiced and works without problems.

SetIndexBuffer(5,MABuffer,INDICATOR_CALCULATIONS);
[...]
if(CopyBuffer(MAHandle,0,0,rates_total,MABuffer)<=0)

Anyway, thanks for the reply. It came in handy one way or another.

Reason: