How close order

 

hi all friends

i 've written an EA recently and i tested it in st-tester on EURUSD and charts and it opened and closed all order successfully,

but when i tested it on EURUSD in a real chart it opened order but did not close the order. i have this problem on EURUSD specially

and i don't know how can i close order definitely.

best regard

 

show your code.

 

hi

phy


i have a partner that he do'nt like that i send the program code for any body

what can you suggest me to my problem?

thanks alot

 
smsafaee:
hi

Jury Session Record of the 17th of October 2008

you what to say that the problem is not because of EA,is it?

I think you just responded to the advertising.
 
The first thing you should do (everybody should do it but few actually do) is to replace every OrderSend(), OrderClose(), etc. with their equivalents from the libOrderReliable.mqh function library (download this to your include folder and use it with #include in your EA).


When all your calls to OrderClose() are replaced with OrderCloseReliable() your problem might already be solved.


PS: does anybody know where is the official home/website/documentation of this lib?

 

hi

7bit


i never include any file in my program

i opened this link and it was text, i think i must make it as an EA and with LibOrderReliable title and after i write #include LibOrderReliable.mqh.

is my sentences true?

how can i make .mqh and use Closefunction in my program?

what must i do after i import it in my program?

thanks

 

smsafaee:

how can i make .mqh and use Closefunction in my program?

You save this code as libOrderReliable.mqh in your include folder (experts/include)

then in your EA (and in any other EA you will write from now on) you simply write

#include <libOrderReliable.mqh>

at the beginning then you can use all the functions that are defined in this file. The function OrderCloseReliable() can be used like the built-in OrderClose() function, it takes the same parameters and behaves the same, except it is much more robust and will try to catch any error that occurs and handle it and retry until successful. The same is the case with OrderSendReliable() and OrderModifyReliable() and all the other functions in this file.

There are a lot of comments in this file and some general tips about making robust EAs, you should read and understand them.

 
And please also read the license: It is GPL, this means you cannot sell closed source EAs created with this lib. If you want to release something that includes or links to these functions you must release it under GPL and give your users all source code of your EA.
 

hi

7bit


thanks for your help, i will check your codes and see the results

i hope that it works true

best regards

 
smsafaee:

hi

7bit


thanks for your help, i will check your codes

Its not my code. But this particular library is used by many other people too and it is robust and can be safely recommended.
 

hi

7bit


i tested these codes but it can not close the orders in EURUSD.

what is your suggestion for me?

i works very good on other charts but not in this chart and i think it is because of my server(Fibo)

in EURUSD EA in first order closed the that very late but in other orders it worked true