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

 
Catrock >>:

В рыночном ордере на данный момент, меняется уровни тейкпрофита и стоп лосса. А не должны.

Возможность изменения имеется в системе моей только для отложенных ордеров. Если ордер становиться рыночным, изменения не допускаются. Всего в эксперте используется один ордер.

Put the full code in the file
 

I redid it from Kim's sample to delete the pending orders, please advise where the error is:

void DeleteOrdersLimit(string sy="", int op=-1) {

int i;

int k=OrdersTotal();


if (sy=="0") sy=Symbol();

for (i=k-1; i>=0; i--) {

if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {

if ((OrderSymbol()==sy || sy==") && (op<0 || OrderType()==op)) {

if (OrderType()==OP_BUYLIMIT || OrderType()==OP_BUYLIMIT) OrderDelete(OrderTicket())

}

}

}

}

 
 
Techno >>:
при такой конструкции да, в секундах. У меня все работает. Скомпилируй и проверь только эту часть кода.
Yes, it works. I must have screwed up somewhere else. Thank you. (chuckles)
 

If you can figure it out... This is my first EA, so I doubt it will be readable for others

I've been putting it on visualization since May 5. And I see what I do not like. The parameters of market orders are changing

Files:
 
Minodi >>:

Переделал с образца Кима, что б удалялись отложки, подскажите в чем ошибка :


void DelLim() 
 {
  for (int i=0;i<OrdersTotal();i++)
    {
       if (OrderSelect(i,SELECT_BY_POS)&&OrderSymbol()==Symbol()&&OrderType()==2||3) 
       OrderDelete(OrderTicket());
    }
 } 
 

Thank you,

Now it's different. it gives out '(' - function definition unexpecte

 
Minodi >>:

Спасибо,

теперь уже другое. выдает - '(' - function definition unexpecte

when calling the function, remove the incoming parameters.
 
Now these messages are appearing in the logbook for some reason
 

Good evening, guys, help a person who does not know programming. need to "decolorize" the indicator. specifically - DeMarker. The idea is this: if the Ask price is less than the Parabolic 0.02/0.2 on H1, the colour of the DeMarker is red, if the price is above Parabolic, the DeMarker is green. Something like this

//---- indicator line
if{ Ask<iSAR(NULL,PERIOD_H1,0.02,0.2,0) COLOR=Red;
Ask>iSAR(NULL,PERIOD_H1,0.02,0.2,0) COLOR=Green;
SetIndexStyle(0,DRAW_LINE,EMPTY,2,COLOR);
}
I understand that I need to describe Ask in some other way, but I don't have enough knowledge for that.