Replies

thongbaogiaodich
31 Aug 2018, 18:41

Hi,

I have this code

ChartObjects.DrawText("pipsaway", PipsAway, StaticPosition.TopRight);


When I compile in cTrader beta, it show error:

Error CS0612: 'cAlgo.API.StaticPosition' is obsolete
Error CS1501: No overload for method 'DrawText' takes 3 arguments

How can I modify my code to new API?

Thanks!


@thongbaogiaodich

thongbaogiaodich
13 Aug 2018, 10:32

Thanks Panagiotis, Regarding reduce Tick excuting delay, return to my questions: 1. Which method or event I shouldn't use in OnTick() to have best excute time? 2. Between 2 methods above, which code has better excute time? Thanks
@thongbaogiaodich

thongbaogiaodich
12 Jul 2018, 18:36

Thank Andrey for your reply! That all I need.


@thongbaogiaodich

thongbaogiaodich
12 Jun 2018, 18:02

Dear Panagiotis Charalampous,

Do you mean I need to modify the code as the second code in my first post?

private void CloseAllPosition(string tradeDirection)
{
    if (tradeDirection == "Buy")
    {
        int numPos = Positions.Count - 1;
        int i = 0;
        foreach (var pos in Positions)
        {
            if (pos.TradeType == TradeType.Buy)
            {
                if (i != numPos)
                    ClosePositionAsync(pos);
                else
                    ClosePosition(pos);
            }
            i++;
            }
    }
}

I already tried this code but have same result, takes 15ms also. Do you have any suggestion?


@thongbaogiaodich

thongbaogiaodich
11 Jun 2018, 11:00 ( Updated at: 21 Dec 2023, 09:20 )

Dear Panagiotis Charalampous,

Thank you for your reply!

My VPS is in London, but cTrader software connect to Amsterdam proxy, and the latency become too high for me. How can I change proxy back to London?


@thongbaogiaodich

thongbaogiaodich
02 Jun 2018, 16:12

It seems the lastest upgrade of Windows 10 (v1803) cause this freeze.

My laptop run Windows 10, and robot keep freeze each time I run. But my VPS run Windows Server 2008, and robot run smoothly.

I see cTrader already test 3 months for cTrader 3.0 beta, but at that time, the v1803 of Windows 10 isn't release. Can you test carefully cTrader on lastest Windows 10 again? And I sure you will see more bug in cTrader 3.0

Best Regards!


@thongbaogiaodich

thongbaogiaodich
21 May 2018, 10:26

Thanks for your reply!

But if my Server Latency is 45ms, will have difference between them or not? Because as I understand, my Server will update new data each 45ms.


@thongbaogiaodich