A script to close all open orders. - page 6

 

2010.04.02 16:26:26 Sell AUDUSD,M15: removed
2010.04.02 16:26:26 Sell AUDUSD,M15: uninit reason 0
2010.04.02 16:26:26 Sell AUDUSD,M15: different symbols in orders for OrderCloseBy function
2010.04.02 16:26:26 Sell AUDUSD,M15: different symbols in orders for OrderCloseBy function
2010.04.02 16:26:26 Sell AUDUSD,M15: different symbols in orders for OrderCloseBy function
02 16:26:26 Sell AUDUSD,M15: different symbols in orders for OrderCloseBy function
2010.04.02 16:26:26 Sell AUDUSD,M15: different symbols in orders for OrderCloseBy function
2010.04.02 16:26:26 Sell AUDUSD,M15: open #70725301 sell 0.06 AUDUSD at 0.91904 ok
2010.04.02 16:26:25 Sell AUDUSD,M15: loaded successfully

Not working correctly on multiple symbols. It should separate the work of the script on one instrument from its work on another.

 
sever29 >>:

2010.04.02 16:26:26 Sell AUDUSD,M15: removed
2010.04.02 16:26:26 Sell AUDUSD,M15: uninit reason 0
2010.04.02 16:26:26 Sell AUDUSD,M15: different symbols in orders for OrderCloseBy function
2010.04.02 16:26:26 Sell AUDUSD,M15: different symbols in orders for OrderCloseBy function
2010.04.02 16:26:26 Sell AUDUSD,M15: different symbols in orders for OrderCloseBy function
2010.04.02 16:26:26 Sell AUDUSD,M15: different symbols in orders for OrderCloseBy function
2010.04.02 16:26:26 Sell AUDUSD,M15: different symbols in orders for OrderCloseBy function
2010.04.02 16:26:26 Sell AUDUSD,M15: open #70725301 sell 0.06 AUDUSD at 0.91904 ok
2010.04.02 16:26:25 Sell AUDUSD,M15: loaded successfully

Не правильно работает на нескольких инструментах. Надо отделить работу скрипта на одном инструменте от работы на другом, а то он мудрит, объемы по всем парам считает и открывается соответствующим лотом на следующих парах.

Corrected it, use it. Of course I haven't checked.

Files:
scripts_2.zip  2 kb
 


2010.04.02 23:17:27 Sell GBPUSD,M15: removed
2010.04.02 23:17:27 Sell GBPUSD,M15: uninit reason 0
2010.04.02 23:17:27 Sell GBPUSD,M15: different symbols in orders for OrderCloseBy function
2010.04.02 23:17:27 Sell GBPUSD,M15: different symbols in orders for OrderCloseBy function
201004.02 23:17:27 Sell GBPUSD,M15: order #70752873 buy was closed by order #70752888
2010.04.02 23:17:27 Sell GBPUSD,M15: open #70752888 sell 0.04 GBPUSD at 1.51963 ok
2010.04.02 23:17:26 Sell GBPUSD,M15: loaded successfully

 

If you open two seals on one instrument and one seed on the second, the buy script on the first instrument will not cover all the seals (2 pcs.) It will leave one, and the (buy) script will open with a larger lot.

 
sever29 >>:

Если открыть два сел на одном инструменте и один сел на втором, то скрипт бай на первом инструменте, не перекроет все сел (2 шт.) Оставит один, а сам (бай) откроется увеличенным лотом.

I forgot to put brackets in a few places. I even tested it now. I opened two selves on one instrument and one selve on the other. Well, the one with two gaps, it closed the gaps and put a buy on this instrument only.

Files:
scripts_3.zip  2 kb
 

Yes, it's working properly, thank you very much. About the line b/c later or "a little bit of a good thing"?

 

A small inaccuracy, I may not have formulated the TOR correctly. The script does not react to orders opened manually, and you can forget what you opened manually, what you opened with the script, and as a consequence you can get caught out.

 
sever29 >>:

ех, небольшая неточность, я наверно не корректно сформулировал ТЗ. Скрипт не реагирует к ордерам открытым в ручную, а ведь можно забыть что открывал руками, что скриптом и как следствие можно хорошо попасть на этом.

What do you mean it does not react? It doesn't care whether an order is opened manually or not. I tested it myself by opening it manually and then closing it with a script.

 

after the weekend I'll show you an example, open the sel with the script and the sel in the hands, then you can't overlap them with the buy script.

 
That's weird, it's not supposed to be like that. Well, if it is, it'll be like a ficha))))). We'll see what's what on Monday.
Reason: