The reason for this EA:
Again, this EA was requested from a friend a while back. I've updated it with some of the latest features in my other EAs. The original intent here was to catch certain times of day where a currency was likely to be ranging.
I named this one TossUp because I feel it's kind of like flipping a coin. It's not my favorite EA but someone may come up with an idea to make it more useful. Anyways, it was already written so I figured why not share.
- An example use might be to set "DayStartHour01" = 2 with a 3 pip take profit and a tight stop loss or larger one for that matter. The EA would open a long and short at that time each with the settings for that order. Each would have a 3 pip take profit set and whatever your stop loss was set to.
- EA has the ability to do this 10 times a day at this point.
This EA was written to be very simple for the end user and was never intended to do much. If you have a suggestion that doesn't turn this thing into a monster then please share your ideas. Hopefully someone else will find this EA a benefit to them as well.
Poll: Do I have to share my source code?
Want a version that will work on live and demo accounts?Send me an e-mail: [email protected]
Settings://+------------------------------------------------------------------+ //| Input variables | //+------------------------------------------------------------------+ extern string Order01Parameters = "------------------------------------------------------------"; extern double Order01LotSize = 0; //Order lot size (Not placed if = 0) extern int Order01TP = 0; //Take profit (Not placed if = 0) extern int Order01SL = 0; //Stop loss extern int DayStartHour01 = 0; //Hour to start trade extern string Order02Parameters = "------------------------------------------------------------"; extern double Order02LotSize = 0; //Order lot size (Not placed if = 0) extern int Order02TP = 0; //Take profit (Not placed if = 0) extern int Order02SL = 0; //Stop loss extern int DayStartHour02 = 0; //Hour to start trade extern string Order03Parameters = "------------------------------------------------------------"; extern double Order03LotSize = 0; //Order lot size (Not placed if = 0) extern int Order03TP = 0; //Take profit (Not placed if = 0) extern int Order03SL = 0; //Stop loss extern int DayStartHour03 = 0; //Hour to start trade extern string Order04Parameters = "------------------------------------------------------------"; extern double Order04LotSize = 0; //Order lot size (Not placed if = 0) extern int Order04TP = 0; //Take profit (Not placed if = 0) extern int Order04SL = 0; //Stop loss extern int DayStartHour04 = 0; //Hour to start trade extern string Order05Parameters = "------------------------------------------------------------"; extern double Order05LotSize = 0; //Order lot size (Not placed if = 0) extern int Order05TP = 0; //Take profit (Not placed if = 0) extern int Order05SL = 0; //Stop loss extern int DayStartHour05 = 0; //Hour to start trade extern string Order06Parameters = "------------------------------------------------------------"; extern double Order06LotSize = 0; //Order lot size (Not placed if = 0) extern int Order06TP = 0; //Take profit (Not placed if = 0) extern int Order06SL = 0; //Stop loss extern int DayStartHour06 = 0; //Hour to start trade extern string Order07Parameters = "------------------------------------------------------------"; extern double Order07LotSize = 0; //Order lot size (Not placed if = 0) extern int Order07TP = 0; //Take profit (Not placed if = 0) extern int Order07SL = 0; //Stop loss extern int DayStartHour07 = 0; //Hour to start trade extern string Order08Parameters = "------------------------------------------------------------"; extern double Order08LotSize = 0; //Order lot size (Not placed if = 0) extern int Order08TP = 0; //Take profit (Not placed if = 0) extern int Order08SL = 0; //Stop loss extern int DayStartHour08 = 0; //Hour to start trade extern string Order09Parameters = "------------------------------------------------------------"; extern double Order09LotSize = 0; //Order lot size (Not placed if = 0) extern int Order09TP = 0; //Take profit (Not placed if = 0) extern int Order09SL = 0; //Stop loss extern int DayStartHour09 = 0; //Hour to start trade extern string Order10Parameters = "------------------------------------------------------------"; extern double Order10LotSize = 0; //Order lot size (Not placed if = 0) extern int Order10TP = 0; //Take profit (Not placed if = 0) extern int Order10SL = 0; //Stop loss extern int DayStartHour10 = 0; //Hour to start trade extern string EmailParameters = "------------------------------------------------------------"; extern bool EmailNewOrdersPlaced = false; //Send e-mail whenever an order is placed (even limit and stop orders) extern bool EmailProfitLossSummary = false; //Send profit/loss summary anytime order count changes (does not count pending orders) extern string MiscParameters = "------------------------------------------------------------"; extern int MaxSpread = 4; //Will not open order if spread is greater than this number extern bool DisplayProfitLoss = true; //Display history of trades? extern int OrderSlippage = 3; //How many pips can the order placement vary? extern int EAMagicNumber = 20080402; //Used to determine orders placed by this EA
//+------------------------------------------------------------------+ //| Revision notes | //+------------------------------------------------------------------+ /* Version 1.0 (50 downloads): Version 2.0: * Fixed bug with pip calculation on profit display * Fixed problem with E-mail display text * Modified key areas to work with live accounts * Live version made available Pending additions/changes: * Add minute setting to go with hour * E-mail status of EA * Order modified, closed, deleted, etc.? (Not sure how far to go just yet) */ string Version = "TossUp AutoTrader v2.0";
- It is extremely important that MT4 run all week with the charts open and EA attached. No EA can do its thing unless everything is running. That's why you have an EA to trade for you.
- The EA will only run on demo accounts. I will release a live version if it pans out to be something.
Currently supported brokers:
- All
Here are some of my other threads you might find interesting...
"The Pip Nailer" (EA - MTaboneWeb)
AshFX Daily (EA - MTaboneWeb)
DailyHighLow (EA - MTaboneWeb)
GrabMyOrders (EA - MTaboneWeb)
TossUp (EA - MTaboneWeb)
Weekly Open EA
A special thanks to all who have supported this EA and continue to support it.