欢迎访问 外汇EA下载与MT4/MT5自动交易资源 - 聚合外汇EA、黄金EA、量化交易工具与自动化交易实战内容。
登录 注册

DailyHighLow(EA - MtaboneWeb) (DailyHighLow (EA - MTaboneWeb))

author emer | 0 人阅读 | 0 人评论 |
来源:ForexFactory · Trading Systems · 原帖链接
原帖作者:mtaboneweb
发布日期:First Post: Jul 21, 2008 2:41am | Edited Aug 23, 2008 5:41am
Original thread information:

This thread is dedicated to the on-going development of the DailyHighLow EA that I wrote. The idea for this EA has gone through a number of changes but originally started from the Daily95pips thread created by mikelath. Please use this thread as a place to post positive suggestions, bugs, and general discussion of the EA and it's results.

For information and discussion of the Daily95pips system please refer to this thread here...

http://www.forexfactory.com/showthread.php?t=44246

Although this EA has been changed in some very extensive ways, I still feel it will do the job of the original idea behind the Daily95pips and even a lot of the new ideas from that thread.

I was asked to start my own thread and so I would like to keep this thread about the EA I've developed. I would not like to start mixing different versions of EAs written by several others. Hopefully in doing this we all stay on track and of one mind and I will implement all the ideas I can for the EA as long as they enhance the original system and remain true to where it came from. New EAs can be written for other ideas so let's keep on track for each of the ones I've developed.

Source Code (Very Important):

Poll: Do I have to share my source code?

Settings:
Inserted Code
//+------------------------------------------------------------------+
//| Input variables                                                  |
//+------------------------------------------------------------------+
extern string     TradingParameters          = "------------------------------------------------------------";
extern int        DayStartHour               = 6; //What hour would you like trades to be placed?
extern int        LookbackHours              = 6; //Number of hours to look back from starting hour
extern int        HighLowMargin              = 20; //Distance pending orders are placed above/below the high/low
extern bool       PlaceLongOrders            = true; //Place long orders?
extern bool       PlaceShortOrders           = true; //Place short orders?
extern bool       CloseTradesAtEndOfDay      = true; //closes all open/pending orders 1 hour before new trades are placed
extern int        OrderExpirationHours       = 17; //How many hours before the orders expire?

extern string     NumberOfDaysParameters     = "------------------------------------------------------------";
extern int        NumberOfDays               = 50; //Number of days to look back for high/low
extern int        NumberOfDaysMin            = 9; //Minimum number of days to look back

extern string     MaxHighLowParameters       = "------------------------------------------------------------";
extern bool       MaxHighLowIsAverage        = true; //Use the average from the past X days instead of MaxHighLow
extern int        MaxHighLow                 = 80; //Maximum high/low in Pips for look back hours
extern int        MinHighLow                 = 80; //Minimum high/low to use, i.e. average works out to be 67 then use 80 instead

extern string     StopLossParameters         = "------------------------------------------------------------";
extern bool       UseHighLowForSL            = false; //Use the high/low for stop loss rather than individual order settings
extern bool       CalcSpreadIntoSL           = false; //Stop loss is what's set plus spread of currency pair, i.e. spread is 4 and stop loss is 20 then new stop loss is 24

extern string     OppositeOrderParameters    = "------------------------------------------------------------";
extern bool       CancelOppositeOrders       = false; //Cancel longs when short is triggered and vice versa
extern bool       MoveOppositeOrders         = false; //If long is triggered then short is moved up under long's stop loss and vice versa
extern int        OppositeOrderDistance      = 5; //Distance to add to stop loss of opposite trade when moving order, i.e. long is triggered with a stop loss of 20 and original order distance was 40 then new short orders placed at 25 pips below the long trades

extern string     Order01Parameters          = "------------------------------------------------------------";
extern double     Order01LotSize             = 0.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        Order01BE                  = 0; //When is the order set to break even?
extern int        Order01TrailStopTrigger    = 0; //When is trailing stop triggered?
extern int        Order01TrailStopAmount     = 0; //Trail by how many pips?

extern string     Order02Parameters          = "------------------------------------------------------------";
extern double     Order02LotSize             = 0.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        Order02BE                  = 0; //When is the order set to break even?
extern int        Order02TrailStopTrigger    = 0; //When is trailing stop triggered?
extern int        Order02TrailStopAmount     = 0; //Trail by how many pips?

extern string     Order03Parameters          = "------------------------------------------------------------";
extern double     Order03LotSize             = 0.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        Order03BE                  = 0; //When is the order set to break even?
extern int        Order03TrailStopTrigger    = 0; //When is trailing stop triggered?
extern int        Order03TrailStopAmount     = 0; //Trail by how many pips?

extern string     Order04Parameters          = "------------------------------------------------------------";
extern double     Order04LotSize             = 0.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        Order04BE                  = 0; //When is the order set to break even?
extern int        Order04TrailStopTrigger    = 0; //When is trailing stop triggered?
extern int        Order04TrailStopAmount     = 0; //Trail by how many pips?

extern string     Order05Parameters          = "------------------------------------------------------------";
extern double     Order05LotSize             = 0.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        Order05BE                  = 0; //When is the order set to break even?
extern int        Order05TrailStopTrigger    = 0; //When is trailing stop triggered?
extern int        Order05TrailStopAmount     = 0; //Trail by how many pips?

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 bool       DisplayProfitLoss          = true; //Display history of trades?
extern int        OrderSlippage              = 3; //How many pips can the order placement vary?
extern int        EAMagicNumber              = 200804111; //Used to determine orders placed by this EA
Revision Notes:
Inserted Code
//+------------------------------------------------------------------+
//| Revision notes                                                   |
//+------------------------------------------------------------------+
/*

Version 1.0a:

   * Fixed problem with order expiration

Version 1.0b (130 downloads):

   * Fixed problem with order expiration (again)
   * CloseTradesAtEndOfDay added

Version 1.0c (163 downloads):

   * DisplayProfitLoss added (Display Profit/Loss on Chart comments?)
   * Send E-mail when new orders are placed
   * Send E-mail when order total changes (does not count pending orders)

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:

   * E-mail status of EA
      * Order modified, closed, deleted, etc.? (Not sure how far to go just yet)

*/
string Version = "DailyHighLow AutoTrader v2.0";

  1. This should be run on hourly charts.
  2. I do not guarantee any results especially if you decide to change the default settings or run this in another time frame. The EA looks back by bars so if it's not on hourly chart I can't say how it will function.
  3. 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.
  4. The EA will only run on demo accounts. I will release a live version if it pans out to be something.
  5. I will try to post weekly updates at least of the results.

Currently supported brokers:

  1. 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.

📦 帖子附件汇总 (39)

以下是回帖中所有共享的附件(39 个,已去重)。

🔐
请登录后参与评论
注册满12小时后评论,即可解锁附件下载
立即登录