Download MetaTrader 5
To add comments, please log in or register
Looking for like-minded people? You will find lots of them on the Forum!
Hongliang Liu
1196
Hongliang Liu 2014.08.04 03:40 

i have an EA to handle orders automatically from weekday to weekend, and then from weekend to weekday.for example:

Last Friday: buy limit at 1.39000 

Last Friday: Before the market is closed modify open price to 1.40000 far safe reason

This Monday: when ever and where ever run the EA again,it should modify the open price to 1.39000 again

 

now the problem is:

how i can know if the open price has been restored or not?set and judge comments is not reliable as the broker usually changed without notification

i am ready to use the specific expiration to judge.any good ideas?

thanks 

qjol
3243
qjol 2014.08.04 03:47  
save the ticket no. to a file or a GV
Hongliang Liu
1196
Hongliang Liu 2014.08.04 08:32  
qjol:
save the ticket no. to a file or a GV


thanks for your suggestion.i know the solution with file,it's just what i do from weekday to weekend to guarantee all orders being modified(if not, record failed information in file,then try again)

what if EA run in different PC for the next week? 

Keith Watford
Moderator
8009
Keith Watford 2014.08.04 09:00  
Moggy:


thanks for your suggestion.i know the solution with file,it's just what i do from weekday to weekend to guarantee all orders being modified(if not, record failed information in file,then try again)

what if EA run in different PC for the next week? 


Then you would need to copy the GV or file onto the other computer.
whroeder1
13644
whroeder1 2014.08.04 14:14  
Moggy: Before the market is closed modify open price to 1.40000 far safe reason
Why not just delete the pending order and create a new one when market opens?
Hongliang Liu
1196
Hongliang Liu 2014.08.05 01:55  
WHRoeder:
Moggy: Before the market is closed modify open price to 1.40000 far safe reason
Why not just delete the pending order and create a new one when market opens?


thanks for your suggestion.

in fact,i have a switch to allow delete directly,but i think pending orders usually has better close condition than weekend close

now i am trying to use the expiration time for judgement.

thanks again

Hongliang Liu
1196
Hongliang Liu 2014.08.05 01:59  
GumRai:

Then you would need to copy the GV or file onto the other computer.


i am lazy~ and want the EA to be more smart itself,now i am trying to use the expiration time for judgement.

thanks a lot. 

SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI 2014.08.05 08:25  

To be honest, the EA cannot be smarter than you. Only you can make your EA smart or not.

Like what people says, your EA does reflects your behavior in programming.

Hongliang Liu
1196
Hongliang Liu 2014.08.06 01:42  
deysmacro:

To be honest, the EA cannot be smarter than you. Only you can make your EA smart or not.

Like what people says, your EA does reflects your behavior in programming.

yeach,exactly,all EA does are what the programmer tell him to do.lazy is a good personality for a programmer,though firstly he will makes more efforts to make the code more smart.

now i use "magic expiration" for judgement,it works well.

if someone has better way,please kindly tell all of us. 

/
To add comments, please log in or register