Topics
02 Aug 2024, 08:40
 324
 8
14 Jul 2024, 19:24
 1
 275
 0
10 Jul 2024, 20:06
 1
 281
 0
14 Jun 2024, 20:33
 303
 2
Replies

ncel01
15 Nov 2023, 21:01 ( Updated at: 16 Nov 2023, 06:35 )

Can brokers track/sort traders by the number of requests sent to the server(s)?

Heavy Load on Server

A trading bot can execute hundreds and thousands of trading transactions on a daily basis. Certainly way more orders than any manual trader is able to place. Some broker servers are simply not technically able to successfully manage such a huge load.

Additionally, some brokers can be willing to get rid of clients (traders) that execute more requests than those (internally) set as maximum for their business.

@Spotware:
Can brokers track/sort traders by the number of requests sent to the server(s)?
Would be interesting to know if traders can rest assured that they will remain anonymous and not get (possibly) harmed based on this.

I believe this is a very legitimate question and of interest to all the algo traders in the community.

Note that my question has nothing to do with the rate limits set by Spotware:
https://help.ctrader.com/ctrader-automate/rate-limits/


@ncel01

ncel01
11 Oct 2023, 12:59

RE: RE: Positions_Modified(): How to disregard TSL ?

PanagiotisChar said: 

ncel01 said: 

cTrader Team,

Can you please inform if this is possible?

Thank you.

It's not

Hi Panagiotis,

Noted. Thanks for confirming this!


@ncel01

ncel01
11 Oct 2023, 11:05

cTrader Team,

Can you please inform if this is possible?

Thank you.


@ncel01

ncel01
31 Aug 2023, 12:19

cTrader Team,

I see. It has to do with the update frequency. That's clear enough, thank you!

What about the trades direction shown in strategies history, as mentioned above? 


@ncel01

ncel01
31 Aug 2023, 11:06 ( Updated at: 31 Aug 2023, 11:11 )

Hi cTrader Team,

It's called Wriggle. However this is (probably) a general issue.

Remark:

I've also noticed that, when it comes to strategies, the trade direction shown in the history is the opposite to that of when positions were still open.


@ncel01

ncel01
31 Aug 2023, 11:00

RE: RE: Account.Margin not correct : Unacceptable

Spotware said: 

ncel01 said: 

cTrader Team,

Any update on this?

Thanks for informing.

Dear ncel01,

We have identified the issue and it will be resolved in an upcoming update.

Best Regards,

cTrader Team

cTrader Team,

Great. Thanks for the update!


@ncel01

ncel01
31 Aug 2023, 08:57

cTrader Team,

Any update on this?

Thanks for informing.


@ncel01

ncel01
22 Aug 2023, 07:24

I've noticed huge differences in results when backtesting (visual vs non-visual modes).


@ncel01

ncel01
17 Aug 2023, 18:14 ( Updated at: 21 Dec 2023, 09:23 )

Dear cTrader Team,

Below is a very basic cBot sample that will allow you to check this.
I've also added some screenshots for your reference.

My questions:

  1. How come that symbol leverage is higher than that of the account? Even for a demo account you should agree that this does not make any sense at all.
  2. What formula is used to calculate Account.Margin?
    As you can see, even when there are open positions, zero is returned. Also, this returns completely different results from those provided by the given formula, regardless of what leverage (as mentioned above) is used in the calculation.

Should I provide you with any additional information please let me know.

Thanks for clarifying.

using cAlgo.API;

namespace cAlgo.Robots
{
    [Robot(AccessRights = AccessRights.None)]
    public class MarginTest : Robot
    {
        protected override void OnStart()
        {
            Positions.Opened += Positions_Opened;
            Positions.Closed += Positions_Closed;

            Print("Symbol leverage : ", Symbol.DynamicLeverage[0].Leverage);
            Print("Account leverage : ", Account.PreciseLeverage);
            Print("Symbol currency : ", Symbol.QuoteAsset);
            Print("Account currency : ", Account.Asset);
            Print("Symbol pip size : ", Symbol.PipSize);

            PlaceLimitOrder(TradeType.Buy, SymbolName, Symbol.QuantityToVolumeInUnits(1), Symbol.Ask - 300, null, 1500 * Symbol.PipSize, 1500 * Symbol.PipSize);
            PlaceLimitOrder(TradeType.Buy, SymbolName, Symbol.QuantityToVolumeInUnits(1), Symbol.Ask - 600, null, 1500 * Symbol.PipSize, 1500 * Symbol.PipSize);
        }

        private void Positions_Opened(PositionOpenedEventArgs obj)
        {
            Print("**************** Positions_Opened ****************");
            Print("Amount of open positions : ", Positions.Count);

            double tradesTotalSize = 0;
            double accountMargin;

            foreach (var position in Positions)
                tradesTotalSize += position.VolumeInUnits * position.EntryPrice;

            accountMargin = tradesTotalSize / Symbol.DynamicLeverage[0].Leverage;

            Print("Calculated account margin : {0:0.00}", accountMargin);
            Print("Account.Margin : ", Account.Margin);

            Print("Error (%) : {0:0.0}", 100 * (1 - Account.Margin / accountMargin));
        }

        private void Positions_Closed(PositionClosedEventArgs obj)
        {
            if (PendingOrders.Count == 0 && Positions.Count == 0)
                Stop();
        }
    }
}

@ncel01

ncel01
17 Aug 2023, 12:49

Hi Panagiotis,

You never have time to share the information requested.

That's definitely not true.

Please feel free to share a single thread where I haven't provide any evidence.

On the other hand, I remember that, I've already provided evidence in the past and that I didn't get any feedback from you afterwards. So, I really have some difficulty in understanding your concept of being cooperative.

Moaning comments: I have no idea what you mean by that and, to be honest, I prefer not to know.

I am still totally willing to provide evidence on this, that's not the point. If someone (including Spotware) is not able to reproduce this by simply printing Account.Margin, I'll be glad to provide any further details as I've already done many times in the past.

Account.Margin is an API property. Something generic that has nothing to do with my code. That's why I didn't feel a need to provide any further details in advance regarding this. It's not that I don't want to nor that I am not willing to do it. As simple as that.


@ncel01

ncel01
17 Aug 2023, 10:20 ( Updated at: 17 Aug 2023, 10:24 )

Explain what, exactly? That Account.Margin does not return the right value when backtesting indices? I did it.

Needle-in-a-haystack?

Account.Margin is an API property and you're making it something very abstract. More precisely, you're making a drama out of something really simple:

Print(Account.Margin);

It can be a needle-in-a-haystack if you can't see any issue when trying the above, however, it should not a big deal to try it. Is it?

Anyway, at the end it is up to you to check this or not. If this is for you a detail for you feel free to not check it.

If I had to provide evidence on every cTrader issue I would need to work full time on it, however, this is not an option since I already have a 8/5 job.


@ncel01

ncel01
17 Aug 2023, 05:36

Hi to both,

Does that mean you were not able to reproduce the problem or, you didn't even try to?

You can always compare Account.Margin with its calculated value (by applying its formula), through prints, whenever a position is opened/closed.

I guess there's no big science behind it.


@ncel01

ncel01
11 Aug 2023, 08:08

Hi firemyst,

Yes, it would be pretty straightforward, like that, if not considering any manual modifications.

The problem is that I want to implement a protection against manual modifications. Unfortunately, in that case, just comparing the SL with the previous value won't be enough to conclude anything.

I really think there should be a way to simply identity this. The TLS is placed on server and will trigger Positions_Modified() all the time, however, the most likely is that no acton is to be taken in such cases.

As an automated action, I even think there should be a dedicated/separated event for this.


@ncel01

ncel01
04 Aug 2023, 13:01

Dear cTrader Team,

This is not about colours, indicators, etc. This is about to effectively protect investors' money.

No one needs to be a genius to easily conclude that a lot more can be done when it comes to protect investors/traders.
A good is example is the equity-to-equity breach associated to the minimum trading quantities.
An evident harmful non-compliance that has been kept in place.

I'll leave it up to you.


@ncel01

ncel01
03 Aug 2023, 15:17

CLI is available but this does not exactly mean it is fully functional. As an example, to stop the cBot you need to kill the process, meaning that OnStop() won't be triggered.

I haven't tested this but I believe that many other limitations are still in place since no commands are made available.

While users cannot have any control over de CLI other than just killing the process (which btw is the least desirable action to be taken with any application) this can never be fully functional.


@ncel01

ncel01
03 Aug 2023, 11:15

I think the most important at this stage is to be able to run cBots via CLI, in real time, effectively and without any limitations.


@ncel01

ncel01
03 Aug 2023, 10:39

As far as I know, the OnStop() is not only called when the cBot stops by itself but also when pressing the stop button (via cTrader).

Not having this option available via CLI seems to be a huge limitation.

This could be easly achieved through commands if these are made available and, after all, these are the main purpose of a CLI.


@ncel01

ncel01
02 Aug 2023, 12:55

Dear cTrader Team,

Is there any update on this?

It would be also interesting to make a pop-up window available before an investor starts following a strategy. This is a much more effective way to provide any information/ warn Investors than a strategy description which can easly be overlooked.

In addition to this, an option to request for a “key” (e.g.: via email) in order to follow a strategy, would be of value since this would make sure that a communication between provider and investors would have already taken place before a strategy starts being followed.

Thanks for considering these options for the benefit of all traders.


@ncel01

ncel01
02 Aug 2023, 12:34

Dear cTrader Team,

Thanks for providing feedback on this.


@ncel01

ncel01
27 Jul 2023, 10:27

Dear cTrader Team,

The limits are per trader connection.

What does that exactly mean? Per ctrader ID, per trading account (cTrader instance), etc.

Could you please further clarify and add this information to the documentation?

While no further details are provided this will remain extremely ambiguous for everyone.

Thanks for your understanding.


@ncel01