Download MetaTrader 5

How to identify an order's modification

To add comments, please log in or register
Hongliang Liu
1270
Hongliang Liu  

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  
save the ticket no. to a file or a GV
Hongliang Liu
1270
Hongliang Liu  
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
10564
Keith Watford  
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
15582
whroeder1  
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
1270
Hongliang Liu  
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
1270
Hongliang Liu  
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  

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
1270
Hongliang Liu  
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