Replies

PanagiotisCharalampous
07 May 2020, 15:36

Hi amirus.stark,

You need to provide more information about your issue like cBot parameters, backtesting settings and exact dates where you expect your position to close but does not.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
07 May 2020, 15:31

Hi Abdul,

Unfortunately this information does not allow us to determine the problem. To investigate further please send us your settings file and any custom indicators you might me using at community@spotware.com. You can find your settings file at C:\Users\User\AppData\Roaming\broker-cTrader\Settings.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
07 May 2020, 14:44

Hi lordyy,

You can add a counter in OnBar() that will start counting after the position was entered.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
07 May 2020, 14:42

Hi amirus.stark,

You can add a condition checking if positions are 0 before opening a position e.g. Positions.Count() == 0.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
07 May 2020, 11:08

Hi Luca,

There is no specific question here to be answered. You ask from people to go through a 500 lines cBot that does not even build, to spot your mistakes. This is time consuming and nobody will do it. Why should they? You should either teach yourself programming or pay somebody write the code for you. If you have specific questions, we are happy to answer them. But nobody will spend 3-4 hours trying to understand what are you trying to do and fix your code's logical mistakes.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
07 May 2020, 10:34

Hi office3131,

There is a local declaration of PMA variable inside the Calculate function which overrides the global one.

            double PMA = 0;
            double tf3a6 = 0;
            double tf3perc = 0;

You need to delete it.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
07 May 2020, 10:22

Hi Abdul,

 When cTrader crashes, it usually reports two messages in the Windows event log, one of which contains important information for further investigation. It seems that one message is missing from your report and it contains critical information for us to determine the problem. Can please check again the messages in the event viewer and make sure that you have sent everything to us?

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
07 May 2020, 09:25

Hi VulcanTrader,

There is no mobile application for cTrader Copy at the moment. Regarding your commissions they will be deposited to the account that provides the strategy.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
07 May 2020, 09:21

Hi Chay,

In principle what needs to be done is to load more bars for the other timeframe you are trying to use until data is loaded for the bar under calculation. Below the solution I provided to a similar problem

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

namespace cAlgo.Indicators
{
    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC)]
    public class ematf : Indicator
    {
        [Parameter("MA TF")]
        public TimeFrame matf { get; set; }

        [Parameter("Period")]
        public int emaper { get; set; }

        [Output("EMA TF", Color = Colors.White)]
        public IndicatorDataSeries main { get; set; }

        Bars bars;

        protected override void Initialize()
        {

            bars = MarketData.GetBars(matf);
        }

        public override void Calculate(int index)
        {
            while (double.IsNaN(bars.ClosePrices[bars.OpenTimes.GetIndexByTime(Bars.OpenTimes[index])]))
            {
                bars.LoadMoreHistory();
            }
            var ma1 = Indicators.ExponentialMovingAverage(bars.ClosePrices, emaper).Result;
            //get time
            var charttime = Bars.OpenTimes[index];

            //get index
            var idx1 = bars.OpenTimes.GetIndexByTime(charttime);

            main[index] = ma1[idx1];


        }

    }
}

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
07 May 2020, 09:05

Hi Vamsi,

1. We will need more information about this. You will need to provide us with the source code and steps to reproduce this behavior. It is almost certain that there is something wrong on your side.

2. You can find OpenAPIMessagesFactory here. Note that there are no instructions to update the Open API Library project. The instructions refer to updating only the proto classes found in the Proto folder.

3. Positions and pending orders can be retrieved using ProtoOAReconcileReq.

4. It seems to be a bug in the example project. Please go to OpenApiMessagesPresentation, Line 114 and change 

 sbReconcile.Append("ID: " + position.HasPositionId + Environment.NewLine);

to

sbReconcile.Append("ID: " + position.PositionId + Environment.NewLine);

5. See point 4

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
07 May 2020, 08:37

Hi Eliezer,

You still need to use Last() for ClosePrices. See below

 var PreviusClose = Bars.ClosePrices.Last(5);

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
07 May 2020, 08:34

Hi Pierluigi,

When you stop following a strategy the funds will remain in your subaccount. You can move the remaining balance to your main account by right clicking on the subaccount and selecting Remove Funds.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
06 May 2020, 08:19

Hi Fernando,

This can be done using a cBot. There are already some commercial products out there that do this.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
06 May 2020, 08:14

Hi firemyst,

Why do you use DateTime.SpecifyKind() function?

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
06 May 2020, 08:10

Hi Gwave,

If you already have the project then you can add it as an existing project to your cBot solution and then add it as a reference in your cBot project. Read this post, it could be helpful.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
05 May 2020, 15:59

Hi Gwave,

Can you provide more information? What is NeuralNet? Did you download/install it somewhere? Why do you expect to see it in the Reference library?

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
05 May 2020, 14:54

Hi tobioluwatoki,

Can you please try a clean installation of cTrader and let me know if it resolves the problem?

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
05 May 2020, 14:32

Hi Gwave,

Please also provide us with your broker, the optimized cBot parameters ranges and your optimization settings. We need to have all the required information to reproduce the problem.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
05 May 2020, 11:10

Hi lordyy,

You can use GetSymbol() method to get the symbol information of your position's symbol.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
05 May 2020, 10:06

Hi lordyy,

There is no function in the API that will give you this value. You will need to calculate it yourself.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous