Topics
16 Nov 2023, 07:42
 1170
 1
15 Nov 2023, 10:36
 2069
 16
Replies

Spotware
05 Sep 2017, 09:20 ( Updated at: 21 Dec 2023, 09:20 )

Dear Trader,

Thanks for posting in our forum. You equity at any time equals to the balance plus the unrealized net profit and loss. See screenshot below.

Here the equity is calculated with the following equation, €2500 + (-€4.72) = €2495.28.

In your case, what seems to be happening is that you are closing only profitable positions, causing the profit to be realized and your balance to be increased while the losing positions are keeping your equity low.

Best Regards,

cTrader Team


@Spotware

Spotware
05 Sep 2017, 09:12

Dear lec0456,

If you could share your code maybe we could advise of a better way to program the desired functionality. For example, you can maintain your own counter instead of relying on the Positions.Count property.

Best Regards,

cTrader Team


@Spotware

Spotware
05 Sep 2017, 09:07

Dear Trader,

Thanks for reporting this issue to us. We tried reproducing the described behavior following your description but we couldn't. Market series for several symbols that are closed for trading seems to be working fine. Can you please provide us with the cBot and a specific symbol that reproduces the error. Please also inform us which broker do you use so that we can use the exact same environment to reproduce the problem.

Best Regards,

cTrader Team


@Spotware

Spotware
05 Sep 2017, 08:57 ( Updated at: 21 Dec 2023, 09:20 )

Dear Trader,

Thanks for posting in our forum. Try changing the Bear Outline color. See image below.

Let us know if this is what your are looking for

Best Regards,

cTrader Team


@Spotware

Spotware
04 Sep 2017, 16:51

Dear Trader,

To avoid abuse of the Accounts API there is a limitation of one request per two seconds. Please see here

Best Regards,

cTrader Team


@Spotware

Spotware
04 Sep 2017, 12:36

Dear Trader,

You can find examples on how to use the functions in the links above. HasCrossedAbove and HasCrossedBelow functions can be used for all indicators. See also below a small example checking if the simple moving average indicator has crossed above the exponential moving average indicator

var sma = Indicators.SimpleMovingAverage(MarketSeries.Close, 5);
var ema = Indicators.ExponentialMovingAverage(MarketSeries.Close, 5);
var crossedAbove = sma.Result.HasCrossedAbove(ema.Result, 5);

Let us know if you need any further explanation.

Best Regards,

cTrader Team


@Spotware

Spotware
04 Sep 2017, 09:20

Dear Trader,

Thanks for posting in our forum. You might find the following functions useful.

HasCrossedAbove and HasCrossedBelow can be used for checking if two dataseries have crossed each other in the respective direction. ChartObjects class contains functions to draw different objects on your charts. SendEmail function can be used to send emails and notifications when some events occur.

Let us know if the above information is helpful for you.

Best Regards,

cTrader Team


@Spotware

Spotware
04 Sep 2017, 09:01

Dear hungtonydang,

Can we have a complete cBot that reproduces this issue to check and advise accordingly? We cannot see anything suspicious in the code provided but information is missing, e.g. we cannot see how the StopLoss value is set.

Also note that ModifyPositionAsync() is an asynchronous function and there is no guarantee that it will be executed before Print(). Try ModifyPosition() instead and let us know if the problem still applies.

Best Regards,

cTrader Team


@Spotware

Spotware
01 Sep 2017, 14:46

Hi pretoriano,

Currently we do not have any example as the feature is currently in development. As soon as we have something to show then we will announce it in the Coming Soon section of the forum.

Best Regards,

cTrader Team


@Spotware

Spotware
01 Sep 2017, 14:28

Dear Trader,

See an example below that might help. The logic of the example is to check enter criteria inside OnBar() event so that you enter the marker only once in each bar and to check exit criteria inside OnTick() so that you can exit the marker when your exit criteria are met. You can adjust the code accordingly.

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

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class NewcBot : Robot
    {
        [Parameter(DefaultValue = 0.0)]
        public double Parameter { get; set; }
        private bool _criteriaToEnter;
        private bool _criteriaToExit;
        protected override void OnStart()
        {
            // Put your initialization logic here
        }
        protected override void OnBar()
        {
            if (_criteriaToEnter)
            {
                ExecuteMarketOrder(TradeType.Buy, Symbol, 1000);
            }
        }
        protected override void OnTick()
        {
            if (_criteriaToExit)
            {
                ClosePosition(Positions[0]);
            }
        }

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

Let us know if this is what you are looking for.

Best Regards,

cTrader Team 


@Spotware

Spotware
01 Sep 2017, 09:52

Dear Trader,

Thanks for informing us about this issue. You should be getting your password on creating a new account in Spotware cTrader demo. We are currently investigating why the email was not sent. In the meanwhile, you can open a demo account with one of our brokers and use it for your FIX API experimentation.

Best Regards,

cTrader Team


@Spotware

Spotware
01 Sep 2017, 09:42

Dear Depesh,

Thanks for posting in our forum. We have noticed that you have also posted this as job so we are putting the link here as a reference for other professionals interested in assisting you with your cBot.

Best Regards,

cTrader Team


@Spotware

Spotware
01 Sep 2017, 09:35

Dear Trader,

Thanks for posting in our forum. Your issue is related with your cBot's access rights which are declared in the cBot's attributes. You can find the guide for the access rights here.

More specifically, you need to change your cBot's access rights from AccessRights.None to AccessRights.FileSystem like the example below

 [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FileSystem)]

Best Regards,

cTrader Team


@Spotware

Spotware
01 Sep 2017, 09:16

Dear mondoworld, 

Thanks for reporting this issue to us. In order to investigate it further we will need to know the broker. If you wish to also contact us by email you can reach us at feedback@spotware.com and community@spotware.com.

Best Regards,

cTrader Team


@Spotware

Spotware
31 Aug 2017, 12:06

Hi PanPat,

We investigated the issue and it seems there is a demo account following your strategy. Therefore the mirroring funds are 0 but you cannot stop providing signals. To be able to stop providing signals you need to either close your positions or the account that follows you to stop following you.

Best Regards,

cTrader Team


@Spotware

Spotware
31 Aug 2017, 09:13 ( Updated at: 21 Dec 2023, 09:20 )

Dear PanPat,

If you want to stop mirroring other providers, you have to click the Stop button besides the strategy you are following which is listed under your account. See image below

If you want to stop providing signals to other users, click the "Stop Providing Signals" button on the top right corner of the account's page. See image below

Let us know if this information is helpful to you.

Best Regards,

cTrader Team


@Spotware

Spotware
30 Aug 2017, 17:33

Dear pretoriano,

It is in our plans to implement linked charts in cTrader. They will offer similar functionality to the tool you propose, meaning that changes on one chart will affect the rest of the linked charts.

Best Regards,

cTrader Team


@Spotware

Spotware
30 Aug 2017, 15:11

Dear Trader,

This happens because the ping request is disabled in the example project. In order to enable the ping request, please go to TradingApiTest.cs, line 70 and uncomment the SendPingRequest function.

Let us know if this works for you.

Best Regards,

cTrader Team 


@Spotware

Spotware
30 Aug 2017, 14:44

Dear Trader,

Web requests are required for Accounts API. Trading API uses sockets. It is not a prerequisite to have a web application. Nevertheless, you can send the requests from a WinForms application as well. You can take the Connect API library found in our ASP.Net sample application and use in a WinForms project as well. 

Let us know if you need any further assistance on this.

Best Regards,

cTrader Team


@Spotware

Spotware
30 Aug 2017, 13:59

Hi Alex,

Yes we uploaded it yesterday. We will put an announcement in the forum soon.

Best Regards,

cTrader Team


@Spotware