Topics
16 Nov 2023, 07:42
 1089
 1
15 Nov 2023, 10:36
 1968
 16
Replies

Spotware
17 Dec 2013, 09:11

RE:

lec0456 said:

Ok, so in this post you use a function:

/forum/whats-new/1463

 private int GetIndexByDate(MarketSeries series, DateTime time)
        {
            for (int i = series.Close.Count - 1; i > 0; i--)
            {
                if (time == series.OpenTime[i])
                    return i;
            }
            return -1;
        }

We don't need to use this function or multitime frames anymore? because its implemented as a method, correct?

Yes that is correct.


@Spotware

Spotware
16 Dec 2013, 15:29

There are plans for it but we cannot provide an ETA at the moment.


@Spotware

Spotware
16 Dec 2013, 14:27

Thank you for the suggestion. This should be implemented in the future but at the time being we cannot provide an ETA for it.


@Spotware

Spotware
16 Dec 2013, 14:08

This problem was only affecting demo accounts and it has been fixed. Thank you for your patience.


@Spotware

Spotware
16 Dec 2013, 11:52

Thank you for the feedback. We are currently working on the improvements you mentioned for the backtesting as well as Visual Studio integration.


@Spotware

Spotware
16 Dec 2013, 11:46

Thank you for the suggestion. This is also planned.


@Spotware

Spotware
16 Dec 2013, 11:44

We are planning to enhance the DrawText methods to support additional features including specifying X, Y coordinates for static position texts.


@Spotware

Spotware
16 Dec 2013, 11:16

The "index" that is the parameter to the Calculate method, is the index of the series that the instance is attached to. The series of other timeframes / symbols have different indexes. So, to get the index of a specific series you would need to use a method such as GetIndexByTime and GetindexbyExactTime.

example:

        MarketSeries series;

        protected override void Initialize()
        {
            series = MarketData.GetSeries(Symbol, TimeFrame.Daily);
        }

        public override void Calculate(int index)
        {
            var index2 = series.OpenTime.GetIndexByExactTime(MarketSeries.OpenTime.LastValue);
            if (index2 > 0)
                var close = series.Close[index2];
        }

The difference between the two is that GetIndexByTime returns the closest index to the open time, whereas the GetindexbyExactTime will only return an index if there is one at the exact time and will return -1 otherwise.


@Spotware

Spotware
16 Dec 2013, 09:38

We will be contacting you on your registered email in order to ask for some information and investigate this. Thank you.


@Spotware

Spotware
13 Dec 2013, 16:55

RE:

cogs said:

Been asking about range bars for a while and no news.

At this stage I am better off paying someone a few hundred $ to make up the indicator.

The implementation of range bars is in progress.


@Spotware

Spotware
13 Dec 2013, 16:45

RE: RE:

hichem said:

Wouldn't that expose .algo files to including malware ? I mean anyone can include anything in the .algo files and since the content will not be inspectable, a developer can put malware in the .algo file and no one can discover it.

 

Spotware said:

Starting from the next version algo files will be protected. Also, algo files will be automatically installed, so it will be easier to distribute them.
All referenced dll's will be included into the algo file.

 

If the source code is attached it is recommended to read it before running. 
We recommend not to run .algo files without source code from not trusted publishers.

 


@Spotware

Spotware
13 Dec 2013, 15:23

We will look into this.


@Spotware

Spotware
13 Dec 2013, 14:58

Thank you for the kind words and your feedback. We will work on improving the backtesting.


@Spotware

Spotware
13 Dec 2013, 14:50

RE:

lec0456 said:

Can you download a csv from the server?

No, this is not possible.


@Spotware

Spotware
13 Dec 2013, 14:44

RE: RE:

ErikD said:

Does this always have to be done when dealing with calculations that need the past value of it self in order to complete?

Yes. The data series will be populated with NAN initially, so if you are trying to access past values they should contain some value such as zero or the closing price.


@Spotware

Spotware
13 Dec 2013, 14:24

Please see the New Trading API Guide.


@Spotware

Spotware
13 Dec 2013, 12:48

We assure you that we are working on this. We apologize for all the inconvenience.


@Spotware

Spotware
13 Dec 2013, 09:25

RE:

lec0456 said:

isn't the code in the example wrong? It reads:

foreach (var position in Positions)
{
    ClosePosition(positions);
}

There is o variable positions, right? shouldn't it be:

foreach (var position in Positions)
{
    ClosePosition(position);
}

???

Yes, thank you for pointing that out. 


@Spotware

Spotware
12 Dec 2013, 17:55

We will investigate again. We apologize for this. If you could  send us troubleshooting information by pressing Ctrl+Shift+Alt+T it will be helpful.


@Spotware

Spotware
12 Dec 2013, 17:53

This should be released in about 2 weeks in cTrader. Not in cTrader Web at the moment.


@Spotware