[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 99

 
ScioMe:

Saved, under these names, the new chart opens the same way, in the old way. There is a file strategytester.htm in the templates folder I don't know what to do with this file.

It means that something was done wrong, maybe MT was not restarted. Tested, should work.
 
zas:
Hello, can you help me with this question? I haven't found it on the forum. The thing is that after I open a file in Excel, the data is represented as a date, and if I change the date format, I get the wrong data. I tried different types of dates, but the same thing. I tried to specify the data type (Excel asks) when loading, but the numbers seem to be represented as a dotted number (for example 1.5624), and Excel does not want to do anything with them.

The question is not on the subject of the forum, because you need to go to a computer literacy course and learn to use Word and Excel, or find a book on these programs and study.

And on your specific question, select the necessary cells, bring the cursor to them, click the right mouse button, then "Format cells ..." and select the desired format of data presentation.

 

Guys, tell me a tip...

You have to compare the first peak of the histogram with the second one, if the second one is smaller in abs value, then open buy provided that both of them are below zero and after that assign the value of the second one to the first peak, If after formation of the first peak the histogram column went from negative to positive area, then cancel presence of the first peak, as I have - i.e. by condition we reset both flags.

It turns out that when I identify parameters of the first peak, the same condition (the same parameters) holds for the second. And this is an error... I would like to somehow "separate" these facts (with their unique parameters) of formation of figures 1 and 2, I give my code and figure for the bay...

double a1,a2,a11,a22;//  значения первого и второго пика 
bool fl1 = false;    //  флаги наличия 1-го и 2-го пика для их сравнения для входа в рынок по 3-ему варианту АО
bool fl2 = false;    //
bool signal_buy = false;
bool signal_sell = false;

double AO1 =  iAO(Symbol(), signal_period, 1);
double AO2 =  iAO(Symbol(), signal_period, 2);
double AO3 =  iAO(Symbol(), signal_period, 3);
  
 
 
if (AO3 < 0 && AO3 > AO2 && AO2<0 && AO2 < AO1 && AO1 < 0 && fl1==false && fl2==false) {a1 = AO22; fl1=true; Print ("образование первого пика",DoubleToStr(a1,6) );}
//    определение наличия 1-го пика, флаг установлен
 Print ("первый пик = ", DoubleToStr(a1, 6) );
 
// в след строке ошибка - получается, что после идентификации 1-го пика - эти же условия выполняются и для 2-го, а этого быть не должно... 
 if (AO3<0 && AO3>AO2 && AO2<0 && AO2<AO1 && AO1<0 && fl1==true && fl2==false)                        // определение наличия 2-го пика, флаги установлены
      { 
        a11 = AO2; fl1=true; fl2=true; Print ("образование второго пика", DoubleToStr (a11,6));
        if (a1<a11 && High [0] > High [1]) 
           { signal_buy = true; a1=a11; fl1=true;fl2=false;}    // активируем бай и запоминаем параметры как первого пика   
        else { a1=a11; fl1=true;fl2=false;}                     // просто запоминаем новый минимум - первый пик   
      }                                                       
  
 if (AO2>0 || High [0] < High [1]) {fl1=false; fl2=false;}     // если какой - либо столбец гистограммы  пересекает 0-ю линию между сигналами 2-а пика
                                                               // то сигнал считается недействительным. Cбрасываем флаги
 if (Mas_Tip[0]!=0 && signal_buy == true )  return(10);        // при доливке и сигнале к покупке открываемся с рынка 
 signal_buy = false;                                           // сбрасываем сигнал к покупке
 
 

 

Any guys who can help create a robot for trading, just have an idea and need help in its implementation, I myself in programming is not strong, you can even get money, but reasonable!

 
ZahvatkiN:

Any guys who can help create a robot for trading, just have an idea and need help in its implementation, I am not strong in programming, you can even get money, but reasonable!

I can do it for reasonable money.
 

I can't understand it.

Written in Russian, but can't understand the Handbook section https://docs.mql4.com/ru/basis/variables/formal

Quote:

Parameters by reference can only be passed within a single module....... (Which module are we talking about?)

Arrays can also be passed by reference, all changes will be reflected in the original array . (Changes the elements of the array?)

 
Hi all, I've been digging around on the forum the whole day and did not find, please advise where you can download the history of quotes euro usd 1 min in hst, csv format or how best to load it for a maximum period of time, the terminal only gives a year. Please send me links or files. I AM GRATEFUL IN ADVANCE.
 
Question???

I opened a pending order -

Ticket = OrderSend(...,OP_SELLSTOP,...,TP,SL);

If(Ticket>0)

{ everything is ok, wait for the pending order to be executed, if it is executed then everything is ok}

else

{wait for the next bar to CLOSE and if the order does not open, forcefully close it with OrderDelite();}

help with code

"wait for pending order to execute"

"wait for the next bar to CLOSE and if the order has not opened, close it forcibly with OrderDelite();"

 
for(k=0; k<KPeriod; k++)              // перебрать KPeriod баров
  if(Low[k]<minimum) minimum=Low[k];  // найти минимум

how to properly replace this with iLowest function?

minimum=Low[iLowest (NULL, 0, MODE_LOW, KPeriod, 0)] - right?

 
robot:
Question???

{wait for the next bar to CLOSE and if the order has not opened, close it forcibly with OrderDelite();}

help with code

"wait for pending order to execute"

"wait for the next bar to CLOSE, and if the order has not opened, close it forcibly with OrderDelite();"

you should understand a little bit of logic and the essence of working with orders.

In order to perform a pending processing or waiting for some event, you must remember the current state of the system and compare it with the expected one.

In your case, you have one event - a new bar has been opened, but the order has not triggered.

To do this, you can go this way:

- remember the Ticket parameter, and the time of the bar at which you opened. If there is a new bar, then you can immediately grab the previously saved Ticket and check if it is a market Ticket or an initial pending one. And if it is pending, delete it.

This variant is not intended for real trade; it is only for tester.

----------

So, you need Time[], OrderSelect(), OrderType(), OrderCloseTime().