Replies

PanagiotisCharalampous
09 Jul 2020, 08:28

Hi luciancastro89,

You can use the statement below to check the number of positions before executing your trading

            if (Positions.Count < NoOfPositions)
            {
                // Execute your trading
            }

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
09 Jul 2020, 08:24

Hi cesafat,

You cannot have an index as a decimal. It just doesn't make sense.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
09 Jul 2020, 08:20

Hi Mark,

The code does not seem complete. Can you please provide the complete cBot code?

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
09 Jul 2020, 08:18

Hi luciancastro89,

These are the lines you have to change 

            if (stochasticOscillator.PercentK.Last(2) < stochasticOscillator.PercentD.Last(2))
            {
                if (stochasticOscillator.PercentK.LastValue > stochasticOscillator.PercentD.LastValue)
                {
            if (stochasticOscillator.PercentK.Last(2) > stochasticOscillator.PercentD.Last(2))
            {
                if (stochasticOscillator.PercentK.LastValue < stochasticOscillator.PercentD.LastValue)
                {

Instead of making these checks which actually check if the two lines have crossed each other, you need to check if PercentK has crossed a specific value. e.g.

           if (stochasticOscillator.PercentK.Last(2) > 20)
            {
                if (stochasticOscillator.PercentK.LastValue < 20)
                {

I hope this helps

Best Regards

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
08 Jul 2020, 16:51

Hi tperalta82,

Can you please provide the symbol, timeframe and broker?

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
08 Jul 2020, 12:56

Hi quantumalgorithmics,

cTrader Copy does not allow 1:1 copying but only equity to equity based copying. Notifications for copied trades are not available at the moment.

 Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
08 Jul 2020, 12:30

Hi Ketu,

Change 

  private readonly ChartTrendLine _chartTrendLine;

to 

   public ChartTrendLine ChartTrendLine { get; }

and then order the collection accordingly as below

 foreach (var signalLine in SignalLineRepository.GetLines().OrderByDescending(x => x.ChartTrendLine.Y1))

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
08 Jul 2020, 12:11

Hi Ketu,

You need to post the complete code for us to be able to help you.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
08 Jul 2020, 11:24

Hi niloytom,

If you need somebody to develop this for you, you can consider posting a Job or contacting a Consultant.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
08 Jul 2020, 09:41

Hi francisang92,

You need to have a unique name for each object. Else when the DrawText() is called using the name of an existing object, the object will be replaced with the new one.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
08 Jul 2020, 08:37

Hi cokeplus898,

Did you cross check the prices received with what you see in cTrader UI? Can you see differences? e.g.

If yes, can you provide more information e.g. a video showing the differences? Also let us know your broker.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
08 Jul 2020, 08:33

Hi n2535904,

Optimization for mutlisymbol strategies is not supported at the moment.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
08 Jul 2020, 08:24

Hi tperalta82,

You should be calling the method until the desired amount of bars is retrieved. See below

            var bars = MarketData.GetBars(TimeFrame, SymbolName);
            while (bars.Count < 1000)
            {
                bars.LoadMoreHistory();
            }

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
08 Jul 2020, 08:16

Hi luciancastro89,

You can share your cBot's code and somebody might be able to guide you on what you should change.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
08 Jul 2020, 08:12

Hi mmtt,

You can do this by using Linked Charts.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
07 Jul 2020, 16:54

Hi Napat,

We can confirm that the deals were executed on this account due to equity to equity readjustment.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
07 Jul 2020, 15:46

Hi there,

There are many other reasons where this can happen e.g. your follower was stopped out. To provide you with an exact reason for these deals we need to have the strategy name, your broker and your follower's broker.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
07 Jul 2020, 15:27

Hi there,

It seems that the copier's deals have been executed at midnight. This is the time fees are deposited to strategy providers account and equity to equity readjustments take place. 

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
07 Jul 2020, 14:15

Hi naveenwhy,

See below an example

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

namespace cAlgo
{
    [Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class NewIndicator : Indicator
    {
        [Parameter(DefaultValue = 0.0)]
        public double Parameter { get; set; }

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

        var _lastBarOT;
        protected override void Initialize()
        {
            // Initialize and create nested indicators
        }

        public override void Calculate(int index)
        {
            if (IsLastBar)
            {
                if (Bars.OpenTimes.LastValue != _lastBarOT)
                {
                    _lastBarOT = Bars.OpenTimes.LastValue;
                    // Send your alert
                }
            }
        }
    }
}

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
07 Jul 2020, 14:11

Hi cokeplus898,

This is how FIX works. It streams only changes in price. It can also happen that bid = ask especially in low spread symbols like EURUSD.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous