How to code a news trading robot

Created at 13 Oct 2012, 15:47
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
odomike's avatar

odomike

Joined 15.09.2012

How to code a news trading robot
13 Oct 2012, 15:47


Hi,

 

I am completely new to cAlgo development.  So i dont really know anything on the programming side. I am looking for the code for a robot that will automatically place a pending buy and pending sell at a given time with a specified lot size, etc. Underlisted are the required parameters ...

 

Pipsaway  = The number of pips away from the current market price where the pending buy and sell orders will be placed.

TP           = The Exact Amount Of the Pips u will get as the profit in your account

SL           = Stop Loss amount in pips

NDay       = News Day

NHour      = News Hour (broker's time)

NMin        = News Minute (Broker's time)

CTCBN     = Numbers Candles to check Before News For determining High & Lows , when it is 1 it check 2 candles the current candle and the 1 last one

SecBO     = Seconds Before News Which EA Will Place Pending Orders (In Secs)

SecBMO   = Seconds Before News Which EA Will Stop Modifying Orders (In Secs)

STWAN    = Seconds To Wait After News to Delete Pending Orders (In Secs)

OCO       = One Cancel The Other , will cancel the other pending order if one of them is hit (True/False)

BEPips     = Pips In profit which EA will Move SL to BE+1 after that

TrailingStop = Trailing Stop in pips

MM          = Money Management (True/False)

RiskPercent = Percentage of account equity to be risked in the trade

Lots         = Lot size to be use to execute the trade

 

When activated, robot should run in the background and only place the pending orders at the pre-defined time and date. And should show some kinda error if a wrong time and date is input in its parameter.

 

There is a similar EA on MT4 platform called Amazing EA. You will find it on this link http://www.forexfactory.com/showthread.php?t=6854. You can go through the code and possibly understand it better.

I dont know how possible it is to code this Robot. But I will be most grateful to any cBot developer out there that can code this robot. This will make my life and the lives of many other cAlgo users a lot easier.

 

Thank you in advance.

Michael.


@odomike
Replies

odomike
13 Oct 2012, 16:00

If its possible to include the ability to place LIMIT orders too (Say you use PipsawaySTOP for gap from current price for pending STOP orders and PipsawayLIMIT for gap from current price for pending LIMIT orders ), that will be super fantastic.

This will really make lives easier for lots of us new traders.

 

Thank you in advance.

Michael.


@odomike

admin
15 Oct 2012, 11:44 ( Updated at: 23 Jan 2024, 13:11 )

RE:
odomike said:

If its possible to include the ability to place LIMIT orders too (Say you use PipsawaySTOP for gap from current price for pending STOP orders and PipsawayLIMIT for gap from current price for pending LIMIT orders ), that will be super fantastic.

This will really make lives easier for lots of us new traders.

 

Thank you in advance.

Michael.

Hello Michael,
 
Is this question in reference to the first, about the robot? If not, please add a new thread and clarify a bit, so that we can better assist you.
 
You can place Limit orders in cAlgo
Definition:
CreateBuyLimitOrder(Symbol symbol,int volume,double targetPrice,double? stopLoss,double? takeProfit,DateTime? expiration)

Trade.CreateBuyLimitOrder(Symbol,10000,Symbol.Bid-Symbol.PipSize,null,null,null)
Read more: [/docs/reference/calgo/api/internals/itrade/createbuylimitorder]
 
 
PipsawaySTOP is a bit ambiguous.
 
 
Regards
 

@admin

odomike
26 Oct 2012, 10:13

Yes Admin. The second question is in reference to the first one. I would have gladly editted the question if this forum has the edit feature. Sorry for my late reply.


@odomike

Uche
26 Oct 2012, 10:28

Be advised that unlike the MT4 ea version Calgo is currently unable to modify orders until SecBMO.

The best it can do for now is to place an order say 5-3 Secs before the news release.Works for me.


@Uche

Uche
26 Oct 2012, 10:31

I mean to modify entry prices when I say 'modify orders'.

 


@Uche

admin
26 Oct 2012, 11:15

At the moment you may modify the pending order like so:

Trade.ModifyPendingOrder(pendingorder, stopLoss, takeProfit, expirationTime);

We are working on overloading the method in order to allow the modification of the targe price.

 


@admin

Uche
02 Nov 2012, 16:24

NEWS TRADING ROBOT

http://www.youtube.com/watch?v=8KflrszGj24&feature=plcp.


@Uche

algotrader
14 Nov 2012, 20:17

You can use this News Robot: /algos/show/199


@algotrader

Merlin
23 Dec 2012, 04:55

RE:
algotrader said:

You can use this News Robot: /algos/show/199

Yeah but it doesn't work like this robot in the video here.

http://www.youtube.com/watch?v=8KflrszGj24

I have downloaded the free one posted on cTDN and backtested it on USDJPY on NOV 2 2012 on a 1 Hour chart like on the video and I had 0 trades while the guy on video made $178 during that day.

So if anyone knows where I can get my hands on this NEWS TRADER robot please reply.

Thanks

Merlin

 


@Merlin

cAlgoFx
23 Dec 2012, 15:30

Will be on cAlgoFx in January.

Happy hunting


@cAlgoFx

cAlgoFx
14 Jan 2013, 20:31

NEWSTRADER released

You can download the NEWSTRADER Bot from our website under the Downloads section.

 

Happy hunting


@cAlgoFx

ronan79
29 Jan 2016, 13:57

robots

Is this newstrader bot really good? Cannot find any proofs or field reports of traders. Also, I am interested for binary robots, like 1k daily profit. could you please recommend me where I can read testimonials and not only 1k daily profit review like it's here. And may I really rely on such robots after all? Thanks a lot.


@ronan79