How to define open price of last trade.......

 
Hi, How can i define open price of last trade....... (when is trade still atcive, isn´t closed) thank you
 
rozirozi:
Hi, How can i define open price of last trade....... (when is trade still atcive, isn´t closed) thank you

Hi roz,

Try either or both of the following to track your open trade...

1) OrderOpenTime()

2) OrderOpenPrice()

Hope this helps,

Robert

 
cosmicbeing:

Hi roz,

Try either or both of the following to track your open trade...

1) OrderOpenTime()

2) OrderOpenPrice()

Hope this helps,

Robert




Great OrderOpenPrice() work! Thank you. And if i want define closing price of last closed trade?
 
OrderSelect(history) OrderClosePrice()
 
WHRoeder:
OrderSelect(history) OrderClosePrice()
Hmm thanks, but i get many errors. Pls write me how to use OrderSelect(history) in code. Thank you :-)
 
rozirozi:
Hmm thanks, but i get many errors. Pls write me how to use OrderSelect(history) in code. Thank you :-)
Like this . . OrderSelect using pool MODE_HISTORY
 
RaptorUK:
Like this . . OrderSelect using pool MODE_HISTORY
ok, is it all right?
double Sell1_2 = (OrderSelect(Ticket,MODE_HISTORY)==OrderClosePrice());
 
rozirozi:
ok, is it all right?
No . . I think you need to read this: mql4 for Dummies
 
RaptorUK:
No . . I think you need to read this: mql4 for Dummies
omg I'm not a programmer and just need to add this functionality to the already completed EA.!! It's so hard to write me one line of code??????!!! :-(
 
rozirozi:
omg I'm not a programmer and just need to add this functionality to the already completed EA.!! It's so hard to write me one line of code??????!!! :-(

How a non-programmer know how many lines of code it'll take?
 
He didn't say how many semicolons that line will have LOL
Reason: