A script to close all open orders. - page 4

 
khorosh писал(а) >>

It's not just you. I'm retired, and I still dream about forgetting to pass my credits.:-)


Oh, man, that's rough.

 
sever29 >>:


Обратите внимание, от крыл один бай, затем второй бай, после чего кинул скрипт сел... ни чего не перекрылось, а должны два бая закрыть перекрытием и открыться один сел.

I.e. should I first open a Sell position, then close all the Buy positions so that only the volume specified in the parameter is left?

 
SofTAA писал(а) >>

You want to open a Sell position first, then close all the Buy positions with it, so that only the volume specified in the parameter is left?

yes

 
sever29 >>:

да

take three

Files:
scripts_2.zip  2 kb
 


There were two positions of seals, each at 0.01. Join the script buy.... It should: all positions must be closed with overlap and buy position with volume 0.01. What we have is: one sell closed with overlap, the other one didn't, and the buy position is 0.02.
It is necessary to close all opposite positions with overlap, not just one.

 
sever29 >>:


Было две позиции сел, каждая по 0.01. Присоединяем скрипт бай.... Должно: все позиции сел закрыться перекрытием и остаться бай объемом в 0.01. У нас же получается: закрылась одна сел, другая нет, а поза бай 0.02.
Надо все противополжные закрывать перекрытием, а не только одну.

See what the logbook says? There's probably a mistake.

 

2010.03.31 03:30:40 script buy EURUSD,M1: removed
2010.03.31 03:30:40 '7097633': order #5 was opened : #86294455 buy 0.02 EURUSD at 1.3429 sl: 0.0000 tp: 0.0000
2010.03.31 03:30:40 '7097633': order #86294338 was closed by #86294452
03.03.31 03:30:40 '7097633': request in process
2010.03.31 03:30:40 '7097633': request was accepted by server
2010.03.31 03:30:40 '7097633': close order #86294338 sell 0.01 EURUSD at 1.3426 sl: 0.0000 tp: 0.0000 by order #86294452 buy 0.03 EURUSD at 1.3429 sl: 0.0000 tp: 0.0000
2010 03.31 03:30:40 '7097633': order was opened : #86294452 buy 0.03 EURUSD at 1.3429 sl: 0.0000 tp: 0.0000
2010 03.31 03:30:40 '7097633': request in process
03.03.31 03:30:40 '7097633': request was accepted by server
2010.03.31 03:30:40 '7097633': instant order buy 0.03 EURUSD at 1.3429 sl: 0.0000 tp: 0.0000
2010.03.31 03:30:38 Script buy EURUSD,M1: loaded successfully

 

And in the Expert tab:
2010.03.31 03:30:40 buy EURUSD,M1: removed
2010.03.31 03:30:40 buy EURUSD,M1: uninit reason 0
2010.03.31 03:30:40 buy EURUSD,M1: unknown ticket 86294452 for OrderCloseBy function
2010.03.31 03:30:40 buy EURUSD,M1: order #86294338 was closed by order #86294452
2010.03.31 03:30:40 buy EURUSD,M1: open #86294452 buy 0.03 EURUSD at 1.3429 ok
2010.03.31 03:30:38 buy EURUSD,M1: loaded successfully

 
sever29 >>:

А во вкладке эксперт:
2010.03.31 03:30:40 buy EURUSD,M1: removed
2010.03.31 03:30:40 buy EURUSD,M1: uninit reason 0
2010.03.31 03:30:40 buy EURUSD,M1: unknown ticket 86294452 for OrderCloseBy function
2010.03.31 03:30:40 buy EURUSD,M1: order #86294338 buy was closed by order #86294452
2010.03.31 03:30:40 buy EURUSD,M1: open #86294452 buy 0.03 EURUSD at 1.3429 ok
2010.03.31 03:30:38 buy EURUSD,M1: loaded successfully

all clearly didn't take into account that the ticket changed, you can't write scripts at night))))

 
SofTAA писал(а) >>

all clearly didn't take into account that the ticket changed, you can't write scripts at night))))


See you tomorrow then, i.e. until today, i mean until later today...yeah nights need to sleep:)

Reason: