Page 1 of 41 1 2 3 11 ... LastLast
Results 1 to 10 of 404
Like Tree30Likes

NewsTrader EA

This is a discussion on NewsTrader EA within the Trading tools forums, part of the Trading Forum category; Hi, Please check out the advanced NewsTrader EA which uses the DailyFX Economic Calendar. This EA can be backtested and ...

      
   
  1. #1
    igorad
    Guest

    NewsTrader EA

    Hi,

    Please check out the advanced NewsTrader EA which uses the DailyFX Economic Calendar. This EA can be backtested and optimized if the input parameter LoadFromFile = true. In this case files from the attached DailyFX History.zip should be unpacked and placed in ../tester/files directory. Also you should set proper value for the TimeZone parameter(UseAutoTimeZone = false) and the parameter ReadFromFile should be true.

    Code:
    //---- input parameters
    input string     ExpertName           = "NewsTrader_v6.2 600+";
    
    input int        Magic                =      6060;      //Magic Number 
    input int        Slippage             =         3;      //Slippage in pips 
    
    input string     calInputs            = "===== Calendar settings: =====";
    input string     CalendarDirectory    = "FX News";      //Calendar Directory
    input string     CalendarName         = "Investing.com";//Calendar Name 
    input int        DownloadPause        =       120;      //Pause Between Downloads (sec) 
    input bool       UseAutoTimeZone      =      true;      //Auto TimeZone Detection
    input int        TimeZone             =         3;      //Manual TimeZone
    input bool       ReadFromFile         =     false;      //Read Calendar From File: false-from site,true-from file
    input bool       PrintInLog           =     false;      //Print in Log: false-off,true-on
    input bool       DisplayLines         =      true;      //Display Lines Option: false-off,true-on
    input bool       DisplayText          =     false;      //Display Text Option: false-off,true-on
    input bool       DisplayEvents        =     false;      //Display Events Option: false-off,true-on
    input int        LineStyle            =         3;      //Line Style
    input int        MaxEventLength       =        27;      //News Max Length(in symbols) 
    
    
    input string     timeInputs           = "===== Timing settings: =====";
    input bool       OpenOnClose          =     false;      //Open On Bar Close  
    input int        TimeFrame            =         0;      //TimeFrame 
    input double     TimeGap              =         2;      //Time Gap between News(Bar Close) Time and Order Open Time in min 
    input double     OrderDuration        =        15;      //Order Duratiton Time in min
    input double     ProcessTime          =         1;      //Order Processing Time in min
    input int        SessionEndHour       =        23;      //Session End Time
    input int        FridayEndHour        =        22;      //Session End Time in Friday
    
    input string     ordInputs            = "===== Order settings: =====";
    input int        OrdersNum            =         2;      //Number of pending orders from one side
    input int        HiPrice              =         0;      //Buy Price
    input int        LoPrice              =         0;      //Sell Price
    input int        PriceShift           =         0;      //Price Shift
    input double     PendOrdGap           =        15;      //Gap for Pending Orders from current price in pips
    input double     OrdersStep           =        10;      //Step between orders in pips
    input bool       DeleteOpposite       =      true;      //Opposite Orders delete
    input bool       TrailOpposite        =      true;      //Opposite Orders trailing
    input bool       CloseOnNewEvent      =      true;      //Close Orders On New Event
    
    input double     InitialStop          =        30;      //Initial Stop in pips
    input double     TakeProfit           =       100;      //Take Profit in pips       	
    
    input double     TrailingStop         =        15;      //Trailing Stop in pips      
    input double     TrailingStep         =         0;      //Trailing Stop Step in pips    
    
    input double     BreakEven            =         0;      //Breakeven in pips  
    input double     PipsLock             =         0;      //Lock in pips
    
    input bool       ECN_Mode             =     false;      //ECN Mode 
    input bool       Straddle_Mode        =      true;      //Straddle Mode 
    input bool       DisplayLevels        =      true;      //Display Levels for ECN Mode
    input bool       ShowComments         =      true;      //Show Comments: false-off,true-on(use only for Live Trading and Visual Testing)
    input bool       ShowCalendar         =      true;      //Show Calendar  
    input bool       SaveHTMFormat        =     false;      //Save HTM Format
    
    input string     countryFilter        = "===== Country Filter(None-off, color-on): ====="; 
     
    input color      EUR                  =    clrPink;     //Euro Zone(EUR)    
    input color      USD                  =  clrDodgerBlue; //US(USD)
    input color      JPY                  =  clrOrange;     //Japan(JPY)
    input color      GBP                  =     clrRed;     //UK(GBP) 
    input color      CHF                  =  clrMagenta;    //Switzerland(CHF) 
    input color      AUD                  =   clrGreen;     //Australia(AUD)
    input color      CAD                  =  clrTomato;     //Canada(CAD) 
    input color      NZD                  =    clrGray;     //New Zealand(NZD)   
    input color      CNY                  =  clrOrange;     //China(CNY) 
    
    input string     impFilter            = "===== Importance Filter: =====";
    input string     NewsImportance       =    "L,M,H";     //News Importance Filter ("" - all)
    
    input string     mmInputs             = "===== Money Management settings: =====";
    input int        MM_Mode              =          0;     //MM Mode: 0-off,1-by free Margin
    input double     Lots                 =        0.1;     //Lot size
    input double     RiskFactor           =          0;     //Risk Factor(in decimals) for MM formula 
    input double     MaxLots              =          0;     //Max Lot Size

    Attachment 12669



    UPDATES:

    2014.12.29 - fixed and updated version v5.91 added.
    2015.01.06 - fixed version v5.92 uploaded.
    2015.04.10 - updated version v5.93 uploaded. Since this version you can trade using the ForexFactory Calendar.
    Just enter correct names for CalendarDirectory = "ForexFactoryNews", CalendarName = ""(empty field) and
    ReadFromFile = true. Please set UseAutoTimeZone = false and the proper Manual TimeZone parameter for your broker's time. Also you should apply the ForexFactoryNews indicator to the chart.
    2015.05.01 - updated version v5.94 uploaded. Since this version you can trade on the closed bar after the News Event.
    2015.05.18 - fixed version v5.95 600+ uploaded because of changing the DailyFX Calendar html format.
    2015.06.09 - fixed version v5.96 600+ uploaded.
    2016.01.26 - fixed version v5.98 600+ uploaded because of changing the DailyFX Calendar html format.
    2016.03.07 - fixed version v5.99 600+ uploaded.
    2016.06.27 - fixed version v6.0 600+ uploaded because of changing the DailyFX Calendar html format.
    2017.06.28 - version v6.1 600+: The Investing.com calendar is used instead of the DailyFX calendar.
    2017.07.03 - fixed version v6.2 600+ uploaded.
    2017.08.23 - fixed version v6.3 600+ uploaded.
    2017.09.14 - fixed version v6.4 600+ uploaded.



    Regards,
    Igor

  2. #2
    Administrator newdigital's Avatar
    Join Date
    Feb 2013
    Posts
    10,477
    Blog Entries
    2957
    Follow newdigital On Twitter Add newdigital on Facebook Add newdigital on Google+ Add newdigital on MySpace
    Add newdigital on Linkedin
    Thanks a lot.
    I will try to test/trade it for high impacted news events
    Premium Trading Forum: subscription, public discussion and latest news
    Trading Forum wiki || MQL5 channel for the forum
    Trading blogs || My blog

  3. #3
    Administrator newdigital's Avatar
    Join Date
    Feb 2013
    Posts
    10,477
    Blog Entries
    2957
    Follow newdigital On Twitter Add newdigital on Facebook Add newdigital on Google+ Add newdigital on MySpace
    Add newdigital on Linkedin
    Well ... it works using my Asus Tablet with Windows 8.1 - those are the images about HowTo by charts for

    2014-12-01 15:00 GMT (or 17:00 MQ MT5 time) | [USD - ISM Manufacturing PMI]:

    NewsTrader EA-1.png


    NewsTrader EA-2.png


    NewsTrader EA-3.png


    NewsTrader EA-4.png


    NewsTrader EA-5.png


    NewsTrader EA-6.png
    FHTrading likes this.
    Premium Trading Forum: subscription, public discussion and latest news
    Trading Forum wiki || MQL5 channel for the forum
    Trading blogs || My blog

  4. #4
    Administrator newdigital's Avatar
    Join Date
    Feb 2013
    Posts
    10,477
    Blog Entries
    2957
    Follow newdigital On Twitter Add newdigital on Facebook Add newdigital on Google+ Add newdigital on MySpace
    Add newdigital on Linkedin
    I used different magic number for different pairs ... this is the results:

    NewsTrader EA-opentrades1.png


    NewsTrader EA-opentrades2.png


    NewsTrader EA-opentrades3.png


    NewsTrader EA-opentrades4.png


    -----

    NewsTrader EA-newstrader_0112.gif
    Attached Files Attached Files
    FHTrading likes this.
    Premium Trading Forum: subscription, public discussion and latest news
    Trading Forum wiki || MQL5 channel for the forum
    Trading blogs || My blog

  5. #5
    Administrator newdigital's Avatar
    Join Date
    Feb 2013
    Posts
    10,477
    Blog Entries
    2957
    Follow newdigital On Twitter Add newdigital on Facebook Add newdigital on Google+ Add newdigital on MySpace
    Add newdigital on Linkedin
    As we see from the chart - next high impacted news event will be tomorrow:

    NewsTrader EA-next1.png


    NewsTrader EA-next2.png
    Premium Trading Forum: subscription, public discussion and latest news
    Trading Forum wiki || MQL5 channel for the forum
    Trading blogs || My blog

  6. #6
    Junior Member
    Join Date
    Nov 2013
    Posts
    2
    Hi newdigital,

    Could you share ex4 file? I got some compile errors. Thanks.

  7. #7
    Administrator newdigital's Avatar
    Join Date
    Feb 2013
    Posts
    10,477
    Blog Entries
    2957
    Follow newdigital On Twitter Add newdigital on Facebook Add newdigital on Google+ Add newdigital on MySpace
    Add newdigital on Linkedin
    Quote Originally Posted by stan18 View Post
    Hi newdigital,

    Could you share ex4 file? I got some compile errors. Thanks.
    ex4 file is attached
    Attached Files Attached Files
    stan18 and McHuey like this.
    Premium Trading Forum: subscription, public discussion and latest news
    Trading Forum wiki || MQL5 channel for the forum
    Trading blogs || My blog

  8. #8
    Administrator newdigital's Avatar
    Join Date
    Feb 2013
    Posts
    10,477
    Blog Entries
    2957
    Follow newdigital On Twitter Add newdigital on Facebook Add newdigital on Google+ Add newdigital on MySpace
    Add newdigital on Linkedin
    It will be high impacted newsd event now so we will see how it will be traded by the EA (my tablet is not powerful one so ... )

    NewsTrader EA-news1.png


    NewsTrader EA-news2.png


    NewsTrader EA-news3.png
    Premium Trading Forum: subscription, public discussion and latest news
    Trading Forum wiki || MQL5 channel for the forum
    Trading blogs || My blog

  9. #9
    Administrator newdigital's Avatar
    Join Date
    Feb 2013
    Posts
    10,477
    Blog Entries
    2957
    Follow newdigital On Twitter Add newdigital on Facebook Add newdigital on Google+ Add newdigital on MySpace
    Add newdigital on Linkedin
    Quote Originally Posted by newdigital View Post
    It will be high impacted newsd event now so we will see how it will be traded by the EA (my tablet is not powerful one so ... )
    It was started to trade (I am trading high impacted news events only - they are written as H in the settings of EA)

    NewsTrader EA-started1.png
    Premium Trading Forum: subscription, public discussion and latest news
    Trading Forum wiki || MQL5 channel for the forum
    Trading blogs || My blog

  10. #10
    Administrator newdigital's Avatar
    Join Date
    Feb 2013
    Posts
    10,477
    Blog Entries
    2957
    Follow newdigital On Twitter Add newdigital on Facebook Add newdigital on Google+ Add newdigital on MySpace
    Add newdigital on Linkedin
    One trade (for USDCAD) is going to stop loss now sorry (sl is 30 pips and tp is 100 pips with the trailig stop):

    NewsTrader EA-started2.png
    Premium Trading Forum: subscription, public discussion and latest news
    Trading Forum wiki || MQL5 channel for the forum
    Trading blogs || My blog

Page 1 of 41 1 2 3 11 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •