cTrader News Release Manager

by Paul_Hayes in category Other at 29/01/2016
Description

This cTrader News Release Manager cBot provides signals to pause your robots (x) minutes before, during and after a news release. If you automate your trading using technical indicators then this may fail during a major news release on intra-day, if you are looking long term then the price may recover and continue its trend, if you do not mind the draw-down.

cTrader News Release Manager 

I have modified the robot so that it now manages news releases for all currencies that you list as a comma delimiting string in the user defined parameters. You can now also specify the date format for the CSV file from my-FxBook.

WATCH A VIDEO DEMO

Visit the Product Page to Download

 

If your automated strategy is based on technical indicators then you are gambling during major news releases, if your robot is based on high volatility during a news release then you do not need this robot.

I found that by using this robot I avoided large draw-downs in my strategy over time due to unpredictable price movement, unfortunately you cannot back-test this type of anomaly on this platform.

Here is an example on a 15 minute chart, if the technical indicators would have signaled long it would have blown my stops, but luckily I had sell signals, but this also would have caused me problems as my robots would still be signalling a sell and opened a new short position at the bottom of the spike.

By avoiding a major news release you bypass all the price spikes.

"Watch the video below for a detailed explanation on how to configure Myfxbook"​

WATCH THE MYFXBOOK SETUP VIDEO

Visit the Product Page to Download

 

To get it to work you simply download the news file from MyFxBook in CSV format.

http://www.myfxbook.com/forex-economic-calendar

You can download the CSV file from the more tab as shown below:

 

CURRENCY PAIRS

The news release manage will email you whenever an event is about to happen for a particular currency, but the robot will only manage the currency list you specify in the user settings.


Download the news file to any folder you want, I put mine in the cAlgo folder called news files, you can set the path in the cBot as shown below, I download 1 week ahead every Sunday, but you can do monthly too.

  • You can set the robot to signal (x) minutes before a news release and (x) minutes after, I usually do not start trading again until 3-6 hours after a major news release.
  • You can turn on email notifications which will inform you a news release is about to happen and when it is over and your robots have started trading again.

 

Email Message Example


You can pause all robot instances before a news release or just those that the news release related to, so a United States news release will affect all currency pairs with USD or Indices that are US, to make sure the news files have loaded correctly, just run the robot and in the log file you will see the following: 

 

How to Integrate with your Automated Strategy (cBot)

If you have purchased the Switchback robots from us or if you have downloaded the News Release Manager to be used with your own robots than you can easily manage your trading through our client assembly file with a few lines of code.

WATCH A VIDEO ON HOW TO USE WITH YOUR ROBOT

Visit the Product Page to Download

 

Phone: 0044 20 3289 6573

* All international calls are local rates (low cost)

www.ClickAlgo.com

Creative Trading with Technology

 facebook2  twitter  linkedIn  googlePlus  

Download
1153 downloads
How to install
Warning! Executing the following cBot may result in loss of funds. Use it at your own risk.
Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.
Formula / Source Code
Language: C#
Trading Platform: cAlgo
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
using System.Windows.Forms;
using System.Threading;

// To download the software please visit: http://clickalgo.com/ctrader-news-release-manager

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
    public class ClickAlgoSoftware : Robot
    {
        [Parameter(DefaultValue = 0.0)]
        public double Parameter { get; set; }

        private static Mutex dialogMutex = new Mutex();
        private static bool dialogIsShownOnce = false;

        protected override void OnStart()
        {
            ShowDialogBox();
        }

        protected override void OnTick()
        {
            // Put your core logic here
        }

        protected override void OnStop()
        {
            // Put your deinitialization logic here
        }

        public static void ShowDialogBox()
        {
            dialogMutex.WaitOne();

            if (dialogIsShownOnce)
                return;

            var ret = MessageBox.Show("It is not possible to download the software from the cTDN website.\nWould you like to visit us at ClickAlgo.com where you can download it?", "Downloading...", MessageBoxButtons.YesNo, MessageBoxIcon.Information);

            if (ret == DialogResult.Yes)
            {
                System.Diagnostics.Process.Start("http://clickalgo.com/ctrader-news-release-manager");
            }

            dialogIsShownOnce = true;

            dialogMutex.ReleaseMutex();
        }
    }
}
Comments

galafrin - January 31, 2016 @ 13:20

Thanks for sharing the code Paul.

Paul_Hayes - February 02, 2016 @ 12:45

Please can anybody tell me if you have a problem with the dates, I use the date from your local machine, so it should work.

Thanks.

jens - February 07, 2016 @ 12:36

Hello, thanks for sharing! I want to intergrate into own cBots. At the moment the cAlgo-News-Manager isn't able to read the myFxBook-News-File in Format:

Date,Event,Impact,Previous,Consensus,Actual,Currency
"2016, February 08, 17:00","(United States) Labor Market Conditions Index",Medium,2.90,,,USD
"2016, February 09, 09:00","(Germany) Current Account n.s.a.",Medium,€24.70B,,,EUR
"2016, February 09, 09:00","(Germany) Imports (MoM)",Medium,1.6%,-0.5%,,EUR
"2016, February 09, 09:00","(Germany) Exports (MoM)",Medium,0.4%,0.5%,,EUR

In the setting i'm using a german localized system. The Error-Message after start the Bot "Die Zeichenfolge wurde nicht als gültiges Datetime erkannt" (meaning The strings couln't read in valid format).

Thank's for any help! 

 

Paul_Hayes - February 08, 2016 @ 16:15

Hi Jens,

I have the same dates and it works, I changed to German settings and still did not get a problem.

Send me the news file you are using, also I should have mentioned, do not open in Excel or it will reformat the dates, open the news file in notepad if you are going to save.

contact@calgo4u.com

 

 

aisaac - February 16, 2016 @ 08:50

Error CS0006: Impossibile trovare il file di metadati 'c:\users\aisaa\documents\calgo\libraries\lumenworks.framework.io.dll'

library is missing.

 

 

Paul_Hayes - February 16, 2016 @ 18:13

just install with NuGet from here:

https://www.nuget.org/packages/LumenWorks.Framework.IO/3.8.0

Or email me and I will send you the assembly.

ibandiegovalverde - March 21, 2016 @ 02:13

Hello excuse my English, I'm using a translator.
I am unable to install the LumenWorks.Framework.IO library.
I installed Visual Studio and downloaded LumenWorks.Framework.IO.3.8.0.
But I do not know programming, I do not know how to follow to install the library.
If you could explain how, thanks.

When I put on the console: Install-Package LumenWorks.Framework.IO, she tells me the following:

Install-Package: The current environment does not have an open solution.
Online: 1 Character: 1
+ Install-Package LumenWorks.Framework.IO
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     + CategoryInfo: InvalidOperation: (:) [Install-Package] InvalidOperationException
     + FullyQualifiedErrorId: NuGetNoActiveSolution, NuGet.PowerShell.Commands.InstallPackageComma
    nd

ibandiegovalverde - March 21, 2016 @ 02:48

Hello excuse my English, I'm using a translator.
I am unable to install the LumenWorks.Framework.IO library.
I installed Visual Studio and downloaded LumenWorks.Framework.IO.3.8.0.
But I do not know programming, I do not know how to follow to install the library.
If you could explain how, thanks.

When I put on the console: Install-Package LumenWorks.Framework.IO, she tells me the following:

Install-Package: The current environment does not have an open solution.
Online: 1 Character: 1
+ Install-Package LumenWorks.Framework.IO
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     + CategoryInfo: InvalidOperation: (:) [Install-Package] InvalidOperationException
     + FullyQualifiedErrorId: NuGetNoActiveSolution, NuGet.PowerShell.Commands.InstallPackageComma
    nd

Paul_Hayes - March 21, 2016 @ 08:27

Please read the instructions above to install LumenWorks

galafrin - March 29, 2016 @ 10:17

Hello Paul, to get it work in non-english localized system , it need this :

line 236

fxNews = new FxNewsDailyFxDownloadPath, IncludeMediumLevelNews, IncludeHighLevelNews, CustomDateFormat);

replaced by this:

CultureInfo CI = Thread.CurrentThread.CurrentCulture ;
Thread.CurrentThread.CurrentCulture = new CultureInfo ( "en-US" ) ;
fxNews = new FxNews(DailyFxDownloadPath, IncludeMediumLevelNews, IncludeHighLevelNews, CustomDateFormat);
Thread.CurrentThread.CurrentCulture = CI ;

Then it works in all cultures, otherwise it refuses alphabetic Myfxbook date format on non-english culture system.

 

 

 

 

Paul_Hayes - April 03, 2016 @ 09:17

thank you very much, i will refactor and re-post

Paul_Hayes - April 03, 2016 @ 09:45

Hi Galafrin,

I took a look at the code and the localisation is already included in a sub class which is not provided in the code you see.

you can download the full source code here.

If you have a problem with the news robot, could you report the issue, so I can fix and republish to the community.

many thanks.

alizabe - July 15, 2016 @ 17:10

can someone build a cbot for me. if there are charges, I am ready to pay

Paul_Hayes - February 07, 2017 @ 11:08

An update has been released 07.02.2017 with bug fixes.

http://clickalgo.com/ctrader-news-release-manager

5