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

 
Help with function OrderModify () - I have set conditions under which modification of parameters of an open position should take place, but at test error 4108 occurs.
Invalid ticket number... But if we introduce Alert, it will clearly say that the ticket number has reached modification block. And there's only one order - what's wrong?



------------------------------------------------------------------------------------------------------------
if(OrderType() == OP_BUY)

double A = OrderTicket(),
B = OrderOpenPrice(),
C = Bid-Point*5,
D = OrderTakeProfit();
---------------------------------------------------------------------------------------------------------------
Alert ("Order Number = ",A," Open Price = ",B," New Stop = "," Profit = ",D);
---------------------------------------------------------------------------------------------------------------


OrderModify(OrderTicket(),OrderOpenPrice(),Bid-Point*15,OrderTakeProfit(),0,Blue);
---------------------------------------------------------------------------------------------------------------

 
Lim1 писал(а) >>
Can someone help with OrderModify ()
Where is OrderSelect()?
 

Lim1 15.04.2010 00:22
Помогите кто нибудь с функцией OrderModify () - задал условия при которых должна происходить модификация параметров открытой позиции, но при тестировании происходит ошибка 4108.


Change the type of the variable you are assigning the ticket to - from double to int.
 

How do I change the colour of the buffer?

 
Hello. Please tell me how to delete a group of objects(trendlines) whose names start with "60m".
 
Necron >>:
Здравствуйте. Подскажите пожалуйста как удалить группу объектов (трендовые линии), имена которых начинаются с "60m".

Cycle through all objects if the name begins with "60m" and delete them,

useful functions :

string ObjectName( int index) 
Функция возвращает имя объекта по порядковому номеру в списке объектов. 
int ObjectsTotal( int type=EMPTY) 
Возвращает общее число объектов указанного типа на графике. 
string StringSubstr( string text, int start, int length=0) 
Извлекает подстроку из текстовой строки, начинающейся c указанной позиции.
Функция возвращает копию извлеченной подстроки, если возможно, иначе возвращается пустая строка. 
Ну может ещё пригодиться для определения сколько символов в имени
int StringLen( string text) 
Возвращает число символов в строке. 
bool ObjectDelete( string name) 
Удаление объекта с указанным именем. 
 
nikost писал(а) >>

>>How do I change the colour of the buffer?


If I understand correctly, you mean the colour of the buffer of the custom indicator? Then via indicator_colorN https://docs.mql4.com/ru/basis/preprosessor/compilation

 
Urain >>:

Циклом перебираете все объекты если имя начинаеться на "60m" удаляете,

полезные функции :

Thank you, it's sorted.

 
costy_ >>:

=))

Наверное, ДЦ не позволяет открывать ордера со стопами. Т.е. сначала надо открыть ордер, а потом выставить стопы.


You were right. Thank you!
 
Somebody give me a link to an EA which trades by placing orders backwards from open orders. I've seen it here in the codebase, but can't find it....
Thanks
Reason: