Topics
16 Nov 2023, 07:42
 1088
 1
15 Nov 2023, 10:36
 1967
 16
Replies

Spotware
12 Dec 2013, 17:52

Remove this line from Initialize: 

Wave = CreateDataSeries();

and add this to the beginning of the Calculate method:

            if (index < Period)
            {
                HP[index] = 0;
                Filt[index] = 0;
                return;
            }

Instead of if (index >= Period)


@Spotware

Spotware
12 Dec 2013, 17:12

This issue has been fixed. 


@Spotware

Spotware
12 Dec 2013, 16:54

Could you tell us if you are using gmail with 2-step verification enabled? If so, you will have to disable it for use with cAlgo or use a different email account. If not, could you try to run the robot again and if it occurs again press Ctrl+Shift+Alt+T. This will send us troubleshooting information. 


@Spotware

Spotware
12 Dec 2013, 09:45

ExecuteMarketOrder uses synchronous operation and you will need to subscribe a callback like in the following example if you want a method to be called when the position opens. This callback method will be called each time a position opens by the robot or manually.

Instead of declaring a field for position you can use Label to identify the position opened by the robot, so that in the event the robot is restarted it can continue operation knowing the positions that it opened. Please read the following section: /forum/whats-new/1937

protected override void OnStart()
{
    Positions.Opened += OnPositionsOpened;
}
 
private void OnPositionsOpened(PositionOpenedEventArgs args)
{
    Print("Position #{0} is opened", args.Position.Id);
}

To find positions by label you can use position.Find and position.FindAll.
See /api/positions
 


 


@Spotware

Spotware
11 Dec 2013, 15:07

RE:

fullmonte said:

Incompatible variouable declarations Volume express as Long or Int on different base object attributes of Position in different places and requires cast

We've fixed this in the new trading API. New methods accept volume parameter of type long.

/forum/whats-new/1937


@Spotware

Spotware
11 Dec 2013, 14:51

You can use this method for now:

        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;
        }


 


@Spotware

Spotware
11 Dec 2013, 11:48

RE: RE:

PiTeRMaN said:

Yes, you are right! Spread was volatile that time and you are right again. I checked Journal and i see, both platforms were connected to different proxies, but im asking you now. Is it a reason to have almost 20 pips difference between cTrader & cAlgo and/or between 2 different proxies?? ...IMHO, i dont think so and even in mt4 i had spread lower ;)

Difference in spread depends on quotes coming from broker's liquidity provider. At this moment liquidity provider sent quotes with spread that was frequently changed in a range from 0 to 20+ pips. Spread was changing like that in both cTrader and cAlgo, but one application was receiving those changes a bit later.

 

2nd thing i would need from you, please, provide me "Connection Settings" for London-3 proxy. I asked already my broker, but they told me, they dont have that information.

It's rather difficult for us because of following reasons:

  • Automatic algorithms takes into consideration proxy loading, we can not allow all clients to connect to a single proxy
  • Sometimes we change list of proxies available to a broker, so London-3 can be unavailable for you in future (it will be changed to a different proxy)
  • Sometimes we perform proxy maintains, when it's temporary switched off application have to connect to a different one

If you see that cTrader or cAlgo is connected to a wrong proxy just try to relogin one more time. If you connect to a wrong proxy too often, just send a report with to engage@spotware.com - we will investigate the problem.

 

and 3rd thing is, could you please provide me tick data from 13:29:30 GMT to 13:30:30 GMT. Looks my broker doesnt record tick data, they cant provide me that info, but might you do.

Please send an email to engage@spotware.com - we will provide full tick history for this period.


@Spotware

Spotware
11 Dec 2013, 11:44

RE: RE:

jeex said:

Spotware said:

You can try this on Spotware cAlgo. The method will be available in the next release.

Fixed it by calculating the index-difference:

_XYZindexShift = MarketSeries.Close.Count - _xyz.Close.Count;

And later on use the same indexShift to get the right index.

Thanks for the tip.

The series count difference is not correct to index another series.
Note that when you use the method  GetIndexByExactTime you need to check that the returned value is not equal to -1. The method returns -1 if there is no value at the exact time.


@Spotware

Spotware
11 Dec 2013, 10:53

You can try this on Spotware cAlgo. The method will be available in the next release.


@Spotware

Spotware
11 Dec 2013, 09:59

You need to translate the index from one series, the one of the chart, to the another. There is a method GetIndexByExactTime

            var indexXyz = xyz.OpenTime.GetIndexByExactTime(MarketSeries.OpenTime.LastValue);
            Result[index] = xyz.Close[indexXyz];

 


@Spotware

Spotware
10 Dec 2013, 18:24

We've checked ThinkForex live spreads 06.12.2013 at 13:30 UTC. Spread was very volatile this time because of news event, it was changing in a range from 0 to 20+ pips. So you could see different spreads if your applications were connected to different proxies, so each application needed different time to receive actual quotes. cAlgo and cTrader automatically choose proxy to connect based on its latency and loading.

We recommend to host cAlgo on a VPS close to server for high-frequency trading.


@Spotware

Spotware
10 Dec 2013, 17:40

We will investigate this.


@Spotware

Spotware
10 Dec 2013, 14:33

We are investigating the issue. Thank you for reporting.


@Spotware

Spotware
10 Dec 2013, 12:51

It has been released to Spotware cAlgo first. It will be available to all brokers in the next update.


@Spotware

Spotware
10 Dec 2013, 09:42

RE: RE: RE:

AwarenessForex said:

can you go into more details as to why tick data backtesting wasn't considered from the start of cAlgo development?  I find it hard to believe that a modern trading package post-metatrader 4 is limited to 1 minute data bars for testing strategies.


You are right, tick-based backtesting can be very useful. The reason is that we have of lot of things to do. Tick-based backtesting will be implemented release of tick-charts.


@Spotware

Spotware
09 Dec 2013, 14:50

There are two ways you can accomplish this.

One, you may store the initial volume in an input parameter that you always have access to even after the robot is restarted.
Two, you may enter the volume in the comments field. So, the robot will have access to it, if the position is opened manually as well as via the robot(s).


@Spotware

Spotware
09 Dec 2013, 13:07

This is identified as a ClickOnce issue. The most common way to resolve ClickOnce issues is to uninstall the application, and then perform the installation again.

If it does not help, we recommend to remove the ClickOnce file directory and install the application again.

Ho to clear the ClickOnce file directory:

  1. Open C:\Users\%USERNAME%\AppData\Local\Apps

  2. Delete the folder 2.0

  3. Reinstall the application


@Spotware

Spotware
09 Dec 2013, 13:04

We are not planning this for the time being, maybe in the future.  We advise you to use a VPS located in London. You can find our recommended VPS providers here.


@Spotware

Spotware
09 Dec 2013, 11:43

Could you specify your broker? We'll investigate the issue ASAP.


@Spotware

Spotware
09 Dec 2013, 11:33

We will implement supporting trend lines in templates in the future. We cannot provide an ETA for this, though.


@Spotware