You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Ok lets see
if (OrderHistoryTotal(1))
if ( OrderClosePrice(1) == OrderTakeProfit(1) )
Im only opening one trade at a time.
explain how do you come to use "1" in the function
explain how do you come to use "1" in the function
I understand as Orderhistory accumulates the new entry is in position 1 ?
I understand as Orderhistory accumulates the new entry is in position 1 ?
Is this telling so....
What program is really yours own created...
Think you don't understand att all the program you wanted to change
what is written inside other programs needs most of the time modification in other programs to let it do what you wanted to do
If you don't know what you're doing then you're certainly fail writing the solution
Im sorry there is a miss communication, What im trying to do is to store or access the closed price of the last TP execution.
Example TP executed at 1.4356
There are several reasons for closing a trade. Only the TP closing price Im looking for.
Thank your for any help.
then you have to check if the trade is closed at OrderTakeProfit() ofcours in historytotal
with other words OrderClosePrice()in OrderHistory has to be the same as OrderTakeProfit() then the trade is closed at takeprofitHope you don't mind me
Hope you don't mind I'm interfering here deVries, this is too long for simple solution.
ray 2955, I think you should re - read the book again, there's example at MQL4 Book > Programming of Trade Operations > Closing and Deleting Orders, though it using OrdersTotal().
Here's what deVries mean :
I see this scrolls througth the entire history.
I have a question, a new intry into history isnt in pos. # 1
simular to mode Trade ?
Thanks for this info.
I see this scrolls througth the entire history.
I have a question, a new intry into history isnt in pos. # 1
simular to mode Trade ?
Thanks for this info.
Where do you get that, I mean the link or something.
That code is not even complete :(
Open MetaTrader's Terminal window (Ctrl + T), select account history tab, and do this : if you select Order tab (or Type, or price tab), you will see small triangle, That's how Order history is arranged. So number 1 in account history tab does not always necessary the most recent closed or deleted position.
Thanks for your help I have a better understanding on how history is stored.
I have been away from mql4 for a couple of mos. My brain was fried trying to design a robust EA.
Im back with some new ideas this is a ruebics cube challenge.
On a previous posting deVries provided a linc to this.
If you have any suggestions to getting last executed TP level
I would aprieciate it.Beats by Dr. Dre Tour
If you have any suggestions to getting last executed TP level