Not logged in
Viewing 15 posts - 1 through 15 (of 31 total)

Forums>AlgoWizard / EA Wizard>Application Support>Integrate a News-Filter with ffcal_net

  • #202327 |
    Conmariin
    Customer
    116 Posts

    Hi,

    I’m trying to integrate a News-Filter to avoid the big News and Speaks. The EA shouldn’t open orders in that time (you can configure in the indi attached how many minutes before and after). How can I integrate it in the EA? The Strategy Parameters of Speaks, High and Low Impact News should be boolean. And the Minutes should be editable. Has anyone an idea how to make this with EA Wizard?

    Attachments:
    You must be logged in to view attached files.

    Automatisches Handeln mit Expert Advisor
    https://www.rabenesche.de

    #202354
    Conmariin
    Customer
    116 Posts

    I found inside the ffcal-indi this sample for integration in an EA:

    // EA Setting variables
    // extern int MinsBeforeNews = 60; // mins before an event to stay out of trading
    // extern int MinsafterNews = 60; // mins after an event to stay out of trading
    //
    // // Global variable at top of file
    // bool NewsTime;
    //
    // // Function to check if it is news time
    // void NewsHandling()
    // {
    // static int PrevMinute = -1;
    //
    // if (Minute() != PrevMinute)
    // {
    // PrevMinute = Minute();
    //
    // int minutesSincePrevEvent =
    // iCustom(NULL, 0, “FFCal”, true, true, false, true, true, 1, 0);
    //
    // int minutesUntilNextEve nt =
    // iCustom(NULL, 0, “FFCal”, true, true, false, true, true, 1, 1);
    //
    // NewsTime = false;
    // if ((minutesUntilNextEvent <= MinsBeforeNews) ||
    // (minutesSincePrevEvent <= MinsAfterNews))
    // {
    // NewsTime = true;
    // }
    // }
    // }//newshandling
    //

     

    Don’t know if this is all I need and of course I can put it manually in the EA code. But I wanted to solve it with EA Wizard.

    Automatisches Handeln mit Expert Advisor
    https://www.rabenesche.de

    #202429
    tomas262
    Administrator
    1827 Posts

    Hello,

    ok, i will try to make an example on this

    #202431
    Conmariin
    Customer
    116 Posts

    Thank you tomas for your excellent help! :)

    I think a lot of people find that useful :)

    Automatisches Handeln mit Expert Advisor
    https://www.rabenesche.de

    #204062
    Conmariin
    Customer
    116 Posts

    Pushing it a little bit. ;)

    Can anyone help?

    Automatisches Handeln mit Expert Advisor
    https://www.rabenesche.de

    #204070
    tomas262
    Administrator
    1827 Posts

    Hello,

    you rather use this version of Forex Factory news indicator (attached)

    Then you need to import the indicator as “custom indicator” into EA Wizard

    The indicator uses 2 buffers

    Buffer (0) contains minutes until the most recent event.
    Buffer (1) contains impact value for the most recent event (Low = 1, Medium = 2, High = 3)

    More info can be found here: https://www.mql5.com/en/code/15931

    Buffers can be used as shown on the screenshot attached

    Attachments:
    You must be logged in to view attached files.
    #204131
    Conmariin
    Customer
    116 Posts

    Thanks for your help Tomas! :)

    I’ll try it with your solution!

    Automatisches Handeln mit Expert Advisor
    https://www.rabenesche.de

    #204866
    Conmariin
    Customer
    116 Posts

    I integrate now the Newsfilter in the EA. And it should avoid trading 30 mins before and after HIGH newsimpact only. Medium and Low is okay. Is it okay how I integrated it? What do you think?

     

    Thanks! :)

    Attachments:
    You must be logged in to view attached files.

    Automatisches Handeln mit Expert Advisor
    https://www.rabenesche.de

    #232861
    Participant
    45 Posts

    How do I use this indicator to not trade when there is either a US or UK holiday?

    Do you tie the symbol (USD or GBP) to the holiday (Impact = Non-Economic).

     

     

     

    #232863
    Conmariin
    Customer
    116 Posts

    Hi Steve,

    I don’t know what you exact mean?! If you run the EA with newsfilter on GBPUSD the newsfilter looks for GBP and USD high impacts news.

    Automatisches Handeln mit Expert Advisor
    https://www.rabenesche.de

    #232867
    Participant
    45 Posts

    Thanks for your response Conmariin.

     

    My requirement is to switch off my EA on US and UK holidays only so what you telling me if I use this newsfilter on pairs like EUR/USD, USD/JPY or USD/CAD for example it will switch off all these pairs on US holidays as it will compare the “USD…” to forexfactorys calender “currency” column?    –     USD = USD

     

    Likewise for pair GBP/USD – this will switch off on UK and US holidays. Am I correct?

     

    Sounds promising.

     

    What is the “ImpactBuffer” output value for holidays?

     

     

    #232872
    Conmariin
    Customer
    116 Posts

    Hi Steve,

    I looked in the code of the indicator. The impact values for speaks and holidays weren’t there. I added them (speaks has impactvalue 4 and holidays has impactvalue 5 now) . The compiler says that everything is allright but I didn’t test it in real action on a demo of course. ;-)

    I’m awaiting your test-response :-)

    Attachments:
    You must be logged in to view attached files.

    Automatisches Handeln mit Expert Advisor
    https://www.rabenesche.de

    #232874
    Participant
    45 Posts

    Hi Conmariin,

     

    When I try import your new custome indicator into EA wizard it throws this error (see attached picture)?

     

    Thanks

     

    Attachments:
    You must be logged in to view attached files.
    #232879
    Conmariin
    Customer
    116 Posts

    I imported the original ffc and after exporting EA to mt4 I changed the original ffc with the new ffc in the mt4 indicator folder.

    Automatisches Handeln mit Expert Advisor
    https://www.rabenesche.de

    #232899
    Conmariin
    Customer
    116 Posts

    Actually it throws an error constantly: 2018.03.26 21:35:29.442 FFC EURUSD,M15: cannot set timer (3600)

    Don’t know what that means. I try something different. If I suceed I will tell you! :)

    Automatisches Handeln mit Expert Advisor
    https://www.rabenesche.de

Viewing 15 posts - 1 through 15 (of 31 total)

You must be logged in to reply to this topic.