Topics

Forum Topics not found

Replies

cAlgo_Fanatic
22 Feb 2013, 10:02

Hello thakas,

No, this is not possible currently. As a workaround, you may use two points outputs instead of one line and in the calculation of the indicator display the lime when posistive and set the red to NaN and vice versa. This is an example: /algos/show/188


@cAlgo_Fanatic

cAlgo_Fanatic
21 Feb 2013, 18:03

Hello,

The for loop means that it is looping from index - Periods (which is the current bar - Periods) to index - 1 (which is the previous to the last bar).

If you change this to be index - Periods - X to index - 1 - X, then you should get the desired outcome.

So,

for (int i = index - Periods - X; i <= index - 1 - X; i++)
{
       upper = Math.Max(MarketSeries.High[i], upper);
       lower = Math.Min(MarketSeries.Low[i], lower);
}




@cAlgo_Fanatic

cAlgo_Fanatic
21 Feb 2013, 17:55

Hi Scott,

We apologize for the inconvenience that this is causing. Please try to use cAlgo for the time being. The next release is soon. We will look at your code even though I suspect it the same issue.

Regards,


@cAlgo_Fanatic

cAlgo_Fanatic
21 Feb 2013, 16:21

We have identified an issue with cTrader and are currently working on a solution which should be available in the next release. cAlgo is working properly though. 

Regards,


@cAlgo_Fanatic

cAlgo_Fanatic
21 Feb 2013, 14:08

Thank you. You need to send us an email to engage@ctrader.com and let us know which cAlgo you are using (from Top Menu -> Help -> About cAlgo)

 


@cAlgo_Fanatic

cAlgo_Fanatic
21 Feb 2013, 09:46

Hello,

Is it the indicator found here /algos/show/207 that you are refering to? 

Regards,


@cAlgo_Fanatic

cAlgo_Fanatic
20 Feb 2013, 18:02

please use this namespace:

using System.Linq;


@cAlgo_Fanatic

cAlgo_Fanatic
20 Feb 2013, 16:42

Thank you for letting us know.


@cAlgo_Fanatic

cAlgo_Fanatic
20 Feb 2013, 13:00

Hello softmare,

Does cAlgo receive data but not cTrader? Could you tell us if this is a demo account?

Regards,


@cAlgo_Fanatic

cAlgo_Fanatic
20 Feb 2013, 12:58

Very soon!


@cAlgo_Fanatic

cAlgo_Fanatic
20 Feb 2013, 11:47

RE:
iRobot said:

Hi,

 

are any tutorials on how to write commands on C# for cAlgo?

I am quite new at algo trading and C#, so I don't even understand if command "lastIndex = slowMa.Result.Count - 1" gives number of the index or actual value on that index.

 

These basics would be very helpful.

 

Thanks.

Hello,

The cAlgo API is written in C# programming language and thus coding robots in cAlgo means coding in C# as well. Therefore, I suggest this website to get started with basics of the C# language:

http://www.csharp-station.com/Tutorial.aspx

The above statement will give you the value of the last index in the slowMA DataSeries. The value on that index would be coded like: 

slowMA.Result[slowMA.Result.Count-1]

or better

var lastIndex = slowMA.Result.Count - 1;  // last index
var value = slowMA.Result[lastIndex];      // value at last index

A DataSeries is indexed at 0. Which means the first item has index 0, therefore the last item will be count - 1.

 

 

@cAlgo_Fanatic

cAlgo_Fanatic
20 Feb 2013, 11:00

Hello Hugoman,

Yes, we identified the source of the problem and it has been fixed. It will work properly in the next release.


@cAlgo_Fanatic