Description
News Robot Enhanced (NRE)
This robot will place one or two (depening on settings) pending orders (Buy and Sell) based on the next news event, and will only place a new order (based on next news event) when the first is finished. Will also show the news in localtime on the chart. Trading is optional and can disabled to just show news on chart
André Karlsson <andre@sess.se>
Since the Algo is to big to be uploaded here(?) you have to download it from github. You also have to install the CSV-reader prior to running the cbot. CSV-redaer can be found @ http://www.codeproject.com/Articles/9258/A-Fast-CSV-Reader
Download@ GitHub (Algo with source) (Direct link to repository is: https://github.com/joyider/nre )
Link to Video@Youtube
Updates:
Version 0.9.01b - 2018-02-02
New Feature: Disable trades and only show News(in localtime) on chart
Fixes
- New CSV source (Forexfactory) parsed to new server
- Timezone fix, now woeking in all timezones without manual hack
- Fixed a bug that prevented new orders from being placed after previous win
Version: Production
Will place news trades based on data downloaded from forexfactory using a parser that saves the data @
http(s)://edu.tenforward.io/csvs/Calendar-dd-mm-yyy.csv where the date is the first sunday of the week (US Style)
- Place orders based on High/Meedium/Low news importance
- Show historical news events onscreen
- One Cancle Other or One DON'T Cancel Other
- Trailing stop as an option (places SL at half of takeprofit when reached)
This Cbot was originally based on the News Robot Cbot and the News - DailyFx Economic Calendar Indicator
The News - DailyFx Economic Calendar Indicator is how ever broken and does not work anymore.
I've added some trailing stop and Error handeling to manage empty News lists to make it more versatile and to keep it running during weekends.
Due to the nature on ths Cbot you can NOT backtest it. To try it run it a few weeks on a demo account... or monitor you trades manually in the begining.
This robot will place one or two (depening on settings) pending orders (Buy and Sell) based on the next news event, and will only place a new order (based on next news event) when the first is finished.
If you find any bugs/issues, please let me know. Or if you have any ideas on more enhancement set me an email or write a comment.
I Recommend you to only use news with HIGH importance in order to take advantage of the volatility.
The Algo file is unfortunately too big to upload here :( so you have to install the CSV reader your self. Source code can be found @: GitHub
- ShowNewsOnly - Whether to trade or only display upcoming news on chart.
- Label - Label for current robot, needs to be different for robot running on multiple pairs.
- ShowLow - Show and trade on Low impact news.
- ShowMedium - Show and trade on Medium impact news.
- ShowHigh - Show and trade on High impact news.
- EventsToDisplay - Number of news to show on chart
- ShowPastNews - Show previous news events on chart as tine vertical line
- PastNewsLookback - Download and show historical news number in weeks. 1 is to prefer currently only data for 1 week(2018/02/02)
- Pips away - The number of pips away from the current market price where the pending buy and sell orders will be placed.
- Take Profit - Take Profit in pips for each order
- Stop Loss - Stop Loss in pips for each order
- Volume - trading volume
- Seconds before - Seconds Before News when robot will place Pending Orders
- Seconds timeout - Seconds After News when Pending Orders will be deleted
- One Cancels Other - If "Yes" then when one order will be filled, another order will be deleted
using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;
namespace cAlgo
{
[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class T1eu2_dfile : Robot
{
[Parameter(DefaultValue = 0.0)]
public double Parameter { get; set; }
protected override void OnStart()
{
// Put your initialization logic here
ChartObjects.DrawText("t", "Download @ https://goo.gl/P1admf", StaticPosition.Center, Colors.Yellow);
Print("https://goo.gl/P1admf");
}
protected override void OnTick()
{
// Put your core logic here
Print("https://goo.gl/P1admf");
}
protected override void OnStop()
{
// Put your deinitialization logic here
}
}
}
joyider
Joined on 29.03.2015
- Distribution: Free
- Language: C#
- Trading platform: cTrader Automate
- File name: NRE_Dummy.algo
- Rating: 5
- Installs: 3506
- Modified: 13/10/2021 09:54
Comments
Hi there,
How do i run the CSV reader? i get the same error as last @quarthun. it seems the cBot cannot connect to the web address. is that the issues now?
Hi! I had to update Visual Studio and NLE cbot was successfully built but I've got a new problem:
22/04/2018 19:09:41.410 | cBot "NRE" was started successfully for USDCAD, h1.
22/04/2018 19:09:41.520 | Initialising
22/04/2018 19:09:41.582 | TimeZone Setting: UTC
22/04/2018 19:09:41.582 | TimeZone Name: UTC
22/04/2018 19:09:41.582 | Offset: 00:00:00
22/04/2018 19:09:41.582 | DST: False
22/04/2018 19:09:41.582 | Downloading http://edu.tenforward.io/csvs/Calendar-04-22-2018.csv
22/04/2018 19:10:03.453 | Exception1: Cannot connect to distant servers.
22/04/2018 19:10:03.485 | Exception2: The series does not contain elements.
22/04/2018 19:10:04.467 | Exception3: The series does not contain elements.
22/04/2018 19:10:04.483 | Crashed in OnTimer with NullReferenceException: The object reference is not set to any object instance.
22/04/2018 19:10:04.514 | cBot "NRE" was stopped for USDCAD, h1.
Any idea what I should do? Thanks
Hi! Thanks for sharing your robot. I really appreciate your video and your effort. It seems a usable cbot to me. Could you make a short video or write of the installation, please? I tried it but failed. By the way, the csv-reader link does not work. :( Thanks
Hi,
the server is not responding (anymore?). Bot crashes because of missing response like mentioned already.
Downloading http://edu.tenforward.io/csvs/Calendar-08-12-2018.csv
Exception1: Unable to connect to the remote server
Exception2: Sequence contains no elements
Exception3: Sequence contains no elements