Topics
05 Sep 2013, 14:41
 3676
 3
Replies

gorin
12 May 2014, 10:03 ( Updated at: 21 Dec 2023, 09:20 )

RE: RE:

forgoodnesssake said:

Thank-you for the help.

I did not know if I should start a new thread with my question or post in here.

I would like to have a spread indicator on my chart (I used to use spreadwidener on MT4) and found "Draw spread", when I add it to the chart it is not displayed properly as you can see in the top left corner.

The numbers are covered by the word spread.

When I open the custom indicator box, nothing is clickable, there is no way to change the colour of the font or to adjust the font so that it is readable. Any ideas?

Spotware said:

You can take a ChartShot: 

http://help.spotware.com/charts/chartshots

 

Draw spread indicator has been updated


@gorin

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
09 Sep 2013, 16:13

RE:

Balena said:

I'm using cAlgo with an offshore broker... but are there any brokers in USA that use cAlgo?

thanks

/forum/calgo-support/1069


@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:
longshot said:

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
24 Jul 2013, 11:26

Hi,

You can limit by adding a statement like :

if (volume > 800k )
    volume = 800k;

you can put this statement in the code in the "ExecuteTrade" method at the beginning.


@gorin

gorin
19 Jul 2013, 12:13

Why don't you post this in the jobs section since you are willing to pay. You might get more exposure to your request.


@gorin

gorin
18 Jul 2013, 12:43

Your log says that there was a technical error cancelling an order. That cannot result in loss of money since it's merely a pending order... There must have been something else.


@gorin

gorin
18 Jul 2013, 12:41

System.Windows is supported. What are you trying to do exactly?


@gorin

gorin
16 Jul 2013, 14:34

Is this backtesting or live? If it's live it could be a technical error. Did you check the log? You can try printing something in the event there is a technical error.


@gorin

gorin
16 Jul 2013, 14:28

I read another post where it is mentioned that multitime frames will be implemented in 3 months but I'm assuming it will not be like what you described.
I think you can use a Timer to accomplish this. 


@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