Topics
Replies
gorin
31 Oct 2013, 12:19
RE: Please provide an example
jhtrader said:
Hi,
Can you send things like arrays or variable integers, doubles etc this way between robots?
Can you please add an example of a robot sending information such as a array or if thats not possible perhaps just text or integer to another robot.
Also at the moment I want to communicate with a SQL database would I use pipes for communicating between the SQL server and the Robot?
/forum/cbot-support/1781?page=1#2
@gorin
gorin
05 Sep 2013, 17:37
Hi bp,
Thanks for your reply.
I understand what you are saying and your code, I also thought about it and tried it in the code but it still does not produce results under certain time-frames...
I think as far as the definition of the indicator is concerned it shouldn't be based on daily time-frame. The definition of MACD also says 12-day Ema - 26-day ema... but the calculation is not on daily time-frame only.
I will test more cases with such indicators and post here again.
@gorin
gorin
05 Sep 2013, 11:59
RE:
hichem said:
I'm running cAlgo 24h/7d on my laptop for 3 months now.
I made the robot send me an email every 30 minuts to notifiy it is still working. I sometimes use TeamViewer to login to my laptop from elsewhere.
No problems. and 0$ spent.
You don't get the updates? cAlgo needs to restart when there are updates.
@gorin
gorin
29 Aug 2013, 15:24
Actually,
The selected period does not include the day on which the band is plotted (otherwise the band would never be crossed). For example, the 20-Day Donchian Channels for today are the highest high and lowest low for the preceding 20 trading days.
[http://www.incrediblecharts.com/indicators/donchian_channels.php]
@gorin
gorin
25 Jul 2013, 17:43
RE:
True, but in MT4 I can load historic data of my own going back as far as I want and use it to run backtests. In cAlgo/cTrader I cannot.
It seems strange to me that this software is so well designed facilitate creation of complex and powerful robots, yet a deliberate decision's been made to prevent them being effectively tested. I don't want to be hostage to the amount of data a broker provides, I want as a trader and EA developer to control my own backtest data. In fact, this is a key sticking point for me in the adoption of this platform - I can't justify putting long hours in developing Robots (and converting my existing MT4 EAs) when I can't backtest them to my satisfaction.
Spotware, I want to switch from MT4 to cTrader, I really do - but this issue is a deal breaker.
Hi, I am new to this and could be mistaken but it seems MT4 allows you to choose any start date in their strategy tester but the report never shows any trades prior to 07/2010.
@gorin
gorin
24 Jul 2013, 12:46
Sorry use this one instead:
// ------------------------------------------------------------------------------- // // This is a Template used as a guideline to build your own Robot. // Please use the “Feedback” tab to provide us with your suggestions about cAlgo’s API. // // ------------------------------------------------------------------------------- using System; using cAlgo.API; using cAlgo.API.Indicators; using cAlgo.API.Requests; using cAlgo.Indicators; namespace cAlgo.Robots { [Robot(TimeZone = TimeZones.EasternStandardTime)] public class NewRobot : Robot { private DateTime startTime; private DateTime activeTime; private DateTime stopTime; protected override void OnStart() { startTime = Server.Time.Date; activeTime = startTime.AddHours(9); stopTime = startTime.AddHours(45); Print("Server.Time = {0}", Server.Time); Print("startTime = {0}", startTime); Print("activeTime = {0}", activeTime); Print("stopTime = {0}", stopTime); } protected override void OnTick() { if (Server.Time < activeTime) return; Print("Robot started at Server.Time = {0}", Server.Time); } } }
@gorin
gorin
24 Jul 2013, 12:44
Hi Balena,
Run this code and change TimZones settings to see the output of server time each time:
namespace cAlgo.Robots { [Robot(TimeZone = TimeZones.UTC)] public class NewRobot : Robot { private DateTime startTime; private DateTime activeTime; private DateTime stopTime; protected override void OnStart() { startTime = Server.Time.Date; activeTime = startTime.AddHours(9); stopTime = startTime.AddHours(45); Print(startTime); Print(activeTime); Print(stopTime); } protected override void OnTick() { if (Server.Time < activeTime) return; Print(Server.Time); } } }
I hope the above helps.
@gorin
gorin
16 Jul 2013, 12:10
Sample Martingale with zigzag
//#reference: ..\Indicators\ZigZag.algo // 1. Add reference using System; using cAlgo.API; using cAlgo.API.Requests; using cAlgo.Indicators; namespace cAlgo.Robots { [Robot] public class SampleMartingaleRobot : Robot { private ZigZag zigZag; // 2. declare [Parameter(DefaultValue = 12)] public int Depth { get; set; } [Parameter(DefaultValue = 5)] public int Deviation { get; set; } [Parameter(DefaultValue = 3)] public int BackStep { get; set; } // etc.
protected override void OnStart() { zigZag = Indicators.GetIndicator<ZigZag>(Depth, Deviation, BackStep); // 3. Initialize ExecuteOrder(InitialVolume, GetRandomTradeCommand()); } private void ExecuteOrder(int volume, TradeType tradeType) { Print(zigZag.Result.LastValue); // 4. Get value // etc. } // etc.
@gorin
gorin
12 May 2014, 10:03 ( Updated at: 21 Dec 2023, 09:20 )
RE: RE:
forgoodnesssake said:
Draw spread indicator has been updated
@gorin