Topics

Forum Topics not found

Replies

cAlgo_Fanatic
20 Mar 2013, 11:32 ( Updated at: 23 Jan 2024, 13:16 )

If you restart cAlgo or the Robot, it will not resume and remember any positions opened earlier. In order to modify specific positions created by one robot you may set the [label] property.
If you need additional help with the code let us know.


@cAlgo_Fanatic

cAlgo_Fanatic
20 Mar 2013, 11:26

Please post the code or send it to engage@ctrader.com if you have not already done so, so that we can assist you.

 


@cAlgo_Fanatic

cAlgo_Fanatic
15 Mar 2013, 18:00

You cannot start a robot from another robot for the time being. So you wouldn't be able to have multiple instances.  But you can have multiple orders from within the same robot for the same currency.


@cAlgo_Fanatic

cAlgo_Fanatic
15 Mar 2013, 16:32

Hello,

Please post the code or send it to us to engage@ctrader.com so that we can identify the error.


@cAlgo_Fanatic

cAlgo_Fanatic
15 Mar 2013, 10:25

No, you cannot connect a dukascopy account with cTrader. 


@cAlgo_Fanatic

cAlgo_Fanatic
14 Mar 2013, 17:19

We have plans for implementing both features in a new aplication.


@cAlgo_Fanatic

cAlgo_Fanatic
14 Mar 2013, 16:29 ( Updated at: 21 Dec 2023, 09:20 )

You need to be logged in.

 

 


@cAlgo_Fanatic

cAlgo_Fanatic
14 Mar 2013, 15:10

Could you try a different color or modifying the y-position just in case it results outside the chart. There is nothing wrong with the code, it should normaly be displayed.


@cAlgo_Fanatic

cAlgo_Fanatic
14 Mar 2013, 14:44

Multi time frames are needed for the calculation of the correlation coefficient between two pairs which will be available in the future.


@cAlgo_Fanatic

cAlgo_Fanatic
14 Mar 2013, 14:18

We are investigating the issue and will let you know. 

 


@cAlgo_Fanatic

cAlgo_Fanatic
13 Mar 2013, 12:13

RE: RE:
lec0456 said:
lec0456 said:

BTW, this is using ICmarkets data and that first log is the Slope Indicator @7:34am on 3/7/13

I mean 7:32am

So far we cannot reproduce the issue. We will continue testing and if something is identified we will let you know.
Regards,


@cAlgo_Fanatic

cAlgo_Fanatic
13 Mar 2013, 12:09

RE:
lec0456 said:

i like the way you get the indicator to only print once,  could you explain how that works??  I never understood why it printed twice in the first place...

int t0 = -1 // initialize field to -1 
//...

// Force to print only once per bar within Calculate(int index)
if(t0!= index) // if global field is not equal to index
{
	t0 = index;  
Print... // etc. }

Since the Calculate() event is called on each tick that means that it will execute the code multiple times per bar. In order to Print only once per bar just add the print statement within an if statement to check if the index is not the same as with the previous call. The global field t0 will be assigned to value of the parameter index if they are not the same and the print will execute. The next call will not execute the print statement if t0 equals index since the condition will fail.

 


@cAlgo_Fanatic

cAlgo_Fanatic
12 Mar 2013, 11:53 ( Updated at: 21 Dec 2023, 09:20 )

Please remove all the code except for the print statements which should be identical in order to verify that the indicator produces the same results.

These are the logs for Period 60 m1 timeframe:

 

The code:

Indicator:

        [Parameter(DefaultValue = 60)]
        public int Periods { get; set; }

        private SimpleMovingAverage MA;
	int t0 = -1;
		
        protected override void Initialize() 
        { 
             MA = Indicators.SimpleMovingAverage(MarketSeries.Open, Periods); 
} public override void Calculate(int index) { if(!IsRealTime) return; if(t0!= index) // Force to print only once per bar { t0 = index; int t1 = t0 - 1; Print("{0,20} | {1,20} | {2,20} | {3,20} ",MarketSeries.OpenTime[t0],MA.Result[t0], MA.Result[t1],Math.Round((MA.Result[t0]-MA.Result[t1])/Symbol.PointSize,2)); } }


The Robot:

        SimpleMovingAverage MA;

        protected override void OnStart() 
        {
		MA = Indicators.SimpleMovingAverage(MarketSeries.Open, 60);
        }

        protected override void OnBar()
        {
            int t0 = MarketSeries.Close.Count - 1;//** t0 results are not final because the bar has not completed
            int t1 = t0-1;
            Print("{0,20} | {1,20} | {2,20} | {3,20} ",MarketSeries.OpenTime[t0],MA.Result[t0], MA.Result[t1],Math.Round((MA.Result[t0]-MA.Result[t1])/Symbol.PointSize,2));
        }




@cAlgo_Fanatic

cAlgo_Fanatic
12 Mar 2013, 11:09

 

Hello,

These features will be available soon.  Period separators will be released in 2-3 weeks.

Deal map will also be available very soon.

 


@cAlgo_Fanatic

cAlgo_Fanatic
11 Mar 2013, 11:10

Yes, ChartObjects can be used in Robots. Let us know if you need more help with the code.


@cAlgo_Fanatic

cAlgo_Fanatic
11 Mar 2013, 11:07

Hello,

The print statements from the indicator and the robot match. If this is not the issue please provide us with some more information (i.e. a screenshot indicating the difference or some more explanation).

Also please ensure you are using the same parameters for the indicator and the robot as the default parameters for the myTrend are not the same used in the Robot:

trendShort = Indicators.GetIndicator<myTrend>(60, 1.9, .6);

Whereas, the myTrend default parameters are: 240, 0.8,0.05


@cAlgo_Fanatic

cAlgo_Fanatic
08 Mar 2013, 17:32

Hello,

Look at the log. If the robot crashes, there will be an error message there. You may post that message and/or post your code so that we can take a look at what the issue may be. You may also email the code to engage@ctrader.com

Regards,


@cAlgo_Fanatic

cAlgo_Fanatic
08 Mar 2013, 14:40

Yes.


@cAlgo_Fanatic

cAlgo_Fanatic
08 Mar 2013, 14:38

Renko Charts require tick charts which will be available in the future.


@cAlgo_Fanatic

cAlgo_Fanatic
07 Mar 2013, 18:09

Thank you for the suggestion. Range Bars will be available in the future.


@cAlgo_Fanatic