Topics
11 Nov 2020, 22:19
 2000
 5
26 Jun 2020, 16:07
 1351
 7
21 Sep 2018, 16:22
 1957
 2
30 Jun 2018, 12:58
 1408
 4
29 May 2018, 12:32
 0
 1831
 4
03 May 2018, 13:30
 0
 1508
 1
02 May 2018, 19:08
 1839
 1
Replies

irmscher9
16 Mar 2024, 16:35 ( Updated at: 17 Mar 2024, 07:14 )

RE: RE: RE: Unable to find cTID trader account with id=XXXXXX

PanagiotisCharalampous said: 

mywebsidekicks said: 

wonepo@gmail.com said: 

Hi,

Do you have a solution since ??

Nope :(

Hi there,

You should not use the account number or the cTrader ID number in that field. You should use the ctidTraderAccountId that is included in ProtoOACtidTraderAccount

Best regards,

Panagiotis

Yes, can you give a working code example please


@irmscher9

irmscher9
11 Nov 2020, 22:04

RE:

r.houlahan said:

Hi there,

I am developing a non-C# algorithmic trading program and am wondering how I can use the Open API to interface with cTrader. I am not interested in using cAlgo to write C# bots, as the bulk of my code is written in Python. I cannot seem to find any documention on how to connect the Open API to cTrader - could someone link me any resources so that I can learn about this? 

Thanks in advance. 

So have you managed to make it work eventually?


@irmscher9

irmscher9
11 Nov 2020, 22:04

That's interesting, can't believe Python gets overlooked to so massive extent...


@irmscher9

irmscher9
02 Jul 2020, 22:03

RE:

PanagiotisCharalampous said:

Hi irmscher9,

No but this is just a UI feature. You can all  the information you need in the History section.

Best Regards,

Panagiotis 

Join us on Telegram

Right, but how am I gonna figure out if the provider trading with Stop Loss or no? 


@irmscher9

irmscher9
01 Jul 2020, 16:55

RE:

PanagiotisCharalampous said:

Hi irmscher9,

You can see the trades in your subaccount's history section.

Best Regards,

Panagiotis 

Join us on Telegram

 

Yes, but I can't see the trades on a chart?


@irmscher9

irmscher9
03 Apr 2020, 19:51

RE: RE:

Ok, I have 2 questions then if you don't mind

1. How does the Trailing Stop work then? Because I though "2" is an offset.

2. How does the slippage work, in our case it's set to 2? What does it mean then?

 

firemyst said:

irmscher9 said:

Hi there

ExecuteMarketOrder(TradeType.Buy, Symbol, 10000, "myLabel", 8, 10, 2, "comment", true);

After "myLabel" there are 3 numbers. 

- What is 8?

- What is 10?

- And what is 2?

- Is "comment" necessary? Because cTrader gives me an error when I remove it.

 

Thank you

It's in the API documentation:

 

ExecuteMarketOrder method you have, the parameters are the trade type, the symbol and the volume. The additional optional parameters are label, stop loss, take profit, slippage and the comment, ans whether or not it has a trailing stop.

"Comment" isn't necessary, but the parameter itself is required in this case. If you don't want a comment, set it to an empty string or null.

 

 


@irmscher9

irmscher9
05 Feb 2019, 20:04

Sorry for flooding (there should be an option for quick EDIT on this form).

So.. lastly, if your broker is ICmarkets, then you are lucky. You can find Trading Central in the "Trading tools" drop-down menu.

Cheers =)


@irmscher9

irmscher9
05 Feb 2019, 19:58

OK guys, who is interested in Trading Central, ask your broker for an access (they only work with brokers)


@irmscher9

irmscher9
05 Feb 2019, 18:48

Any updates on this?


@irmscher9

irmscher9
10 Dec 2018, 17:43

It's any Symbol on Real Trading Accounts

 


@irmscher9

irmscher9
18 Nov 2018, 15:26

But ok, never mind, this is not critical..


@irmscher9

irmscher9
18 Nov 2018, 15:00

Yes... well, I'm not trying to. All I do is login to my VPS and see this message :)


@irmscher9

irmscher9
31 Oct 2018, 16:44

Thanks Panagiotis, you are a star!

And for those of you who is reading this, it's better to use ".FirstOrDefault()" instead of ".First()" if you want to avoid the excerption. 


@irmscher9

irmscher9
31 Oct 2018, 15:43

OK, I'm not a c# pro unfortunately..

So how do I print out the found position label then? Print(position) doesnt work and Print(selected) is prints out some gibberish:

 

using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;
using System.Text.RegularExpressions;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class NewcBot : Robot
    {
        [Parameter(DefaultValue = 0.0)]
        public double Parameter { get; set; }



        protected override void OnStart()
        {
            ExecuteMarketOrder(TradeType.Buy, Symbol, 1, "Buy", 400, 600);
        }

        protected override void OnTick()
        {
            var rx = new Regex("\\w+", RegexOptions.IgnoreCase);

            var selected = from position in Positions
                where rx.IsMatch(position.Label)
                select position;

            Print(selected);
        }


        protected override void OnStop()
        {
            // Put your deinitialization logic here
        }
    }
}

 


@irmscher9

irmscher9
31 Oct 2018, 15:17

Thanks for prompt reply Panagiotis! :)


@irmscher9

irmscher9
21 Sep 2018, 16:22

RE:

irmscher9 said:

Hey guys

I like your cTrader copy features and stuff. But in my humble opinion, the name of the software is just horrid. cMirror 2.0 would be MUCH MUCH better. I actually liked it. It sounded professional and attractive. cTrader copy sounds so unprofessional, when it comes to trusting your money to something like this, it can arise questions and doubt for some potential users. Even cMirror Signals - would be better.

I mean cTrader Signals

 


@irmscher9

irmscher9
01 Aug 2018, 15:53

Ok, no problem, here's the bot:

https://www.dropbox.com/s/tiomxggrrkighaa/XBRbot-issue.txt?dl=0

Backtest in Tick-mode from 01/11/2016 to 02/12/2016

Let me know how it goes, thanks!


@irmscher9

irmscher9
03 Jul 2018, 18:04

I guess it's because the in backtesting mode the chart is generated from a backtesting start date?

I'm just trying to make sure that if I disable and reenable my bots, then it won't take 20 hours to get back in into the trading (in real time).


@irmscher9

irmscher9
03 Jul 2018, 13:21

What about backtesting.

The above cBot doesn;t open a position in the first 20 periods whereas it's coded that way so it should open a position straight away..


@irmscher9

irmscher9
28 Jun 2018, 12:08

Thanks :)


@irmscher9