For those of you who do not know what mtpm is: I have written/am writing a multi-purpose trade managing EA. At heart, this is about manipulating stop losses and take profits of trades already open. The only way to get a feel for what the ea does is to read the user guide and try the ea on demo, using what you glean from the guide to help you select your input values.
I posted the first version of mptm back in the summer of 2008. Since then, it has grown and grown. I hope you find it useful.
Disclaimer
I coded a lot of functions into the ea in response to requests from users to do so. I have not used many of them and have forgotten how they work or what they do. Do not bother asking me questions such as, "What do I do to......", or, "How do I....." The chances are that I do not know the answer. In any case, I shall ignore the question. Read the user guide and experiment on demo to find a solution. Feel free to ask questions of other traders here. Someone might know the answer and be prepared to supply an answer; just don't expect one from me. Don't waste time sending me pm's about problems either; I shall ignore them. Well, I shall ignore them on a good day. On a bad day, just remember that I am a power-crazed admin.
Doing thingies for yourselves
Whenever using an ea, script or indicator, it helps enormously if we traders can customise the inputs to suit ourselves. "How to edit a script code" describes how to do this; the lessons learned are equally applicable to any Empty4 software. Read the pdf and learn how to make these basic edits for yourselves; it is both useful and fun to be able to do so. Go on, go for it. You know you can. You know you want to........................
A couple of useful pending order scripts presented by DragosDanescu: http://www.stevehopwoodforex.com/phpBB3 ... p=831#p831
Updates not included in the user guide
Trade management hours. This feature works the same way as does trading hours in my trading EA's, so find one of the umpteen copies of the Shell user guide for details. The reason for this addition is to be found at http://www.stevehopwoodforex.com/phpBB3 ... 9080#p9080
Pips/points conversion
All pips entries should be made in proper pips, not the dreadful points thingy foisted upon us by the market-maker crims determined to confuse us and so separate us from our deposits.
For this, all our thanks go to Lifesys - Paul. Paul has adapted all the previous pips/point stuff that emerged a while ago. He has also adapted the part-close code to simply close Close_LotsFract percent of a trade at each closure point, so no need any more to specify Close_Lots and Preserve_Lots. Thanks Paul. You are a star.
For the coders
There are two multi-purpose functions to deal with the usual OrderModify(), OrderDelete() and OrderClose() functions:
- bool ModifyOrder(int ticket, double price, double stop, double take, datetime expiration, color col, string function, string reason)
- bool CloseOrder(int ticket, string function, double CloseLots, string reason)
For example, CloseBasketTrades() has this call:
Code: Select all
bool result = CloseOrder(OrderTicket(), __FUNCTION__, OrderLots(), ocm );
Code: Select all
bool result = CloseOrder(OrderTicket(), __FUNCTION__, OrderLots() / 2, "Closing half the trade" );
Example of ModifyOrder() for moving the stop loss:
Code: Select all
result = ModifyOrder(OrderTicket(), OrderOpenPrice(), stop, OrderTakeProfit(), OrderExpiration(), clrNONE, __FUNCTION__, slm);
MPBM
There are basket management features in MPTM, but Baluda has created a dedicated Multi-Purpose Basket Manager. Find it at http://www.stevehopwoodforex.com/phpBB3 ... 112#p16112
Versions modified by other coders
I have not necessarily tried them or recommend them or know what the mods are. It just seems fair to apprise members that modifications exist. Experiment with them and see if there is something you can use.
- global's version at http://www.stevehopwoodforex.com/phpBB3 ... 816#p34816