Replies

PanagiotisCharalampous
16 Feb 2021, 10:10

Hi Shares4us,

This happens because every time bars are loaded on the chart, the indicator needs to he reinitialized and recalculated for the new bars arrived. Could you think of a different approach that would move the loading code into the Initialize() method?

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
16 Feb 2021, 08:26

Hi r.stipriaan,

Check your log and you will see the exception below

The problem is that you are trying to close a position even if there is no position open.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
16 Feb 2021, 08:21

Hi GridSurfer,

There is no such option in cTrader Copy. If you want a 1:1 copying of trades you can consider using third party tools like Trade Copier or cMAM.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
16 Feb 2021, 08:18

Hi deknibar,

To see the price you can just add a horizontal line and set the IsInteractive property to true.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
16 Feb 2021, 08:15

Hi Share4us,

You need to do the update asynchronously. The below example might help you.

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

namespace cAlgo
{
    [Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class NewIndicator : Indicator
    {
        protected override void Initialize()
        {
            Task.Factory.StartNew(() => { LongOperationWithProgress(); });
        }

        private void LongOperationWithProgress()
        {
            for (var i = 0; i < 100; i++)
            {
                UpdateProgress(i.ToString() + "%");
                System.Threading.Thread.Sleep(50);
            }
            UpdateProgress("Finished");
        }

        private void UpdateProgress(string message)
        {
            BeginInvokeOnMainThread(() => { Chart.DrawStaticText("progress", message, VerticalAlignment.Top, HorizontalAlignment.Left, Chart.ColorSettings.ForegroundColor); });
        }

        public override void Calculate(int index)
        {
            // Calculate value at specified index
            // Result[index] = ...
        }
    }
}

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
15 Feb 2021, 16:19

Hi deknibar,

Where did you get this screenshot from? And which object are you referring too? The price or the "Daily PP"?

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
15 Feb 2021, 15:22

Hi TopCat,

The teams are aware of this issue. Unfortunately, it needs time to be addressed properly.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
15 Feb 2021, 15:10

Hi Shares4us,

I am not sure what is the question. Can you clarify?

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
15 Feb 2021, 10:50

Hi andywhitehi,

The mobile applications work on any network. We got some reports of issues on some providers and it seems the traffic is blocked by the ISP. You should contact your ISP regarding this issue.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
15 Feb 2021, 10:46

Hi ctid2613585,

I just tested it and I get one. Can you tell me the exact steps you follow?

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
15 Feb 2021, 09:54

Hi matt92,

Can you provide steps to reproduce your problem?

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
15 Feb 2021, 09:52

Hi cenk.avcigil,

This can be easily programmed into a cBot.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
15 Feb 2021, 09:51

Hi ctid2613585,

Just go to Settings > Quick Trade and disable Single-Tap.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
15 Feb 2021, 09:45

Hi drayzen,

Did you restart cTrader? Does this still happen?

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
15 Feb 2021, 09:44

Hi there,

Here is an example of how to plot values on the chart

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

namespace cAlgo
{
    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC)]
    public class NewIndicator : Indicator
    {
        private ExponentialMovingAverage _emaFast;
        private ExponentialMovingAverage _emaSlow;
        [Parameter("Data Source")]
        public DataSeries Price { get; set; }
        [Parameter("Slow Periods", DefaultValue = 21)]
        public int SlowPeriods { get; set; }
        [Parameter("Fast Periods", DefaultValue = 3)]
        public int FastPeriods { get; set; }

        [Output("Slow")]
        public IndicatorDataSeries Slow { get; set; }

        [Output("Fast")]
        public IndicatorDataSeries Fast { get; set; }


        protected override void Initialize()
        {
            // initialize new instances of ExponentialMovingAverage Indicator class 
            _emaFast = Indicators.ExponentialMovingAverage(Price, FastPeriods);
            // _emaSlow is the exponential moving average of the emaFast 
            _emaSlow = Indicators.ExponentialMovingAverage(_emaFast.Result, SlowPeriods);
        }
        public override void Calculate(int index)
        {

            Fast[index] = _emaFast.Result[index];
            Slow[index] = _emaSlow.Result[index];
        }
    }
}

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
15 Feb 2021, 09:20

Hi there,

Can you share the cBot code that is causing this problem?

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
15 Feb 2021, 09:20

Hi Fron,

I am not sure what kind of function are you looking for. This is just a subtraction.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
15 Feb 2021, 09:16

Hi prosteel1,

The plan is for v4.2. Hopefully it will come in the summer.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
15 Feb 2021, 09:15

Hi prosteel1,

Thanks for reporting this. It will be fixed in an upcoming update.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
13 Feb 2021, 16:16 ( Updated at: 21 Dec 2023, 09:22 )

Hi rbrt.gorski,

Here it is

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous