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

 
SergNF >>:


It helped! Thank you very much!




 
chief2000 писал(а) >>

Does anyone have any ideas?


Try to look, read and analyse the comments of the "left over partially closed orders".
Not encountered myself, i.e. what is added to the comment I do not know (something about partial).

 
SergNF >>:


Попробуйте посмотреть, прочитать и проанализировать комменты "оставшихся от частично закрытых ордеров".
Сам не сталкивался, т.е что дописывается в коммент не знаю (что-то про partial).

Thank you!

If anyone is interested, here's the thing - after closing part of an order, the remaining order gets something like "split from order ..." in the comment. When opening orders, I used to give them my own comment "MyOrder_Buy" / "MyOrder_Sell". Now, before going to the split order procedure, it is enough to set the condition:

if(OrderComment()=="MyOrder_Sell" ) { ...OK... }


I read that some banks/brokers(?) close all open orders once a day and immediately re-open them, adding their own comment to the orders. If this is the case then the solution will not work.

It would be ideal to be able to add and change their comments (Custom) - this was asked for in the requests for MT5, but I don't know if it has been implemented or not, as it often is.




 
chief2000, set a magik not a constant, for example 9043434, at opening subtract 1 and write new magiks in the array for open orders, after the modification cross them out of the array, that's all, those that are absent mean they are modified. If OrderMagicNumber>90000
determine whether the order belongs to an EA.
 
Techno >>:
chief2000, задай магик не константой, например 9043434, при открытии отнимай единичку и записывай в массив новые магики для открытых ордеров, после модификации вычеркивай их из массива, . вот и все, тех что нету значит модифицированы. А принадлежность ордера к эксперту определяй так if OrderMagicNumber>9000000




What if there are already open orders, which have not yet reached 100 pips Profit, some have reached - and at that time the computer crashes and the EA is zeroed out. Is there a problem?




 
chief2000 >>:




А если допустим есть уже открытые ордера, которые еще не достигли Прибыли в 100 пипс, некоторые достигли - и в это время комп падает и Советник обнуляется. Проблема?




after each change, store the ticket array in a file, load from that file when it is reset

 
SergNF >>:


т.к. самому int не хватает :)

you can start a second round and go on and on and on)

 
Techno >>:

после каждого изменения загонять массив с тикетами в файл, при обнулении загружать из этого файла


There seems to be an interesting idea - when opening an order, [number of lots * 100 + time_open (minutes or tens of minutes if orders are opened rarely)] should be prescribed as
magician. Then we should compare it with the number of lots (by the same principle) of the current order and if it is equal, then go ahead! Will it work?




 
chief2000 >>:


Кажется возникла интересная идея - при открытии ордера, [количество лотов * 100 + время_открытия] прописывать в качестве
магика. Потом сравнивать его с количеством лотов (по тому же принципу) текущего ордера - если равны то вперед! Будет работать?




There will be, but there will be problems with assigning orders to a given EA, it will take a long cycle to go through everything and discard the ones that are not needed

 
Techno >>:

будет, но будут проблемы с принадлежностью ордеров к данному эксперту, большой цикл понадобится чтобы все переберать и отбрасывать не нужные

Even if there are a dozen orders (on all pairs)... there are other filters. We will have to think about it.
Thank you!


Reason: