Topics
24 Oct 2020, 15:02
 4
 1313
 1
20 Aug 2020, 12:10
 8
 1218
 1
25 Jun 2020, 12:05
 1660
 3
22 May 2020, 10:18
 3
 968
 1
14 May 2020, 10:54
 2
 1511
 4
14 May 2020, 10:33
 4
 1076
 1
03 May 2020, 11:42
 2
 1109
 1
03 May 2020, 11:36
 3
 929
 1
03 May 2020, 11:32
 10
 2026
 5
27 Apr 2020, 18:28
 3
 869
 1
27 Apr 2020, 18:23
 3
 933
 1
27 Apr 2020, 12:08
 3
 903
 1
27 Apr 2020, 12:05
 2
 941
 1
23 Apr 2020, 11:33
 15
 1604
 1
23 Apr 2020, 11:24
 4
 1152
 1
Replies

afhacker
23 Oct 2018, 07:57

You can also use my Advanced Volume indicator, it counts each up/down tick of the last bar and shows it in two different up/down histogram bar.

For historical bars, it uses a formula to count the number of up/down ticks, you can find more detail on its description.


@afhacker

afhacker
27 Sep 2018, 16:56

RE: RE: RE:

peterkalw said:

afhacker said:

peterkalw said:

Thanks @afhacker!

I posted a job request.

Perhaps you could do it?

No, I can't.

I'm too busy right now.

Maybe you can recommend somebody?

Try clickalgo


@afhacker

afhacker
27 Sep 2018, 14:08

RE:

peterkalw said:

Thanks @afhacker!

I posted a job request.

Perhaps you could do it?

No, I can't.

I'm too busy right now.


@afhacker

afhacker
27 Sep 2018, 13:40

It's possible to get TradingView alerts data and use it as a trading signal on your cTrader trading account, you can do it directly from cTrader Automate API or by using Spotware Connect API.

Post a job request in the Jobs page and somebody will develop it for you,


@afhacker

afhacker
26 Sep 2018, 17:03 ( Updated at: 21 Dec 2023, 09:20 )

RE: RE:

andresfborrero97@gmail.com said:

ColossusFX said:

Have you guys seen this?

cMulti

Copy trades to &  from multiple cTrader accounts.

cMulti - Copy trades to &  from multiple cTrader accounts.

I have been using this to manage accounts for friends.

You set which account/s you want to copy from and all trades are copied in real time.

https://www.algodeveloper.com/17-cmulti

Yeah, although it looks like a nice tool... It lacks scalability for enterprise use... It says it is a PAMM when it really is just a personal mirror assistant for copying trades. 

Thanks still

Where did it say its a PAMM? cMulti (cMAM) is a tool for managing multiple cTrader accounts.


@afhacker

afhacker
21 Sep 2018, 07:21

For double generic collections you can use this method:

        public static double Correlation(IEnumerable<double> x, IEnumerable<double> y)
        {
            double xSum = x.Sum();
            double ySum = y.Sum();

            double xSumSquared = Math.Pow(xSum, 2);
            double ySumSquared = Math.Pow(ySum, 2);

            double xSquaredSum = x.Select(value => Math.Pow(value, 2)).Sum();
            double ySquaredSum = y.Select(value => Math.Pow(value, 2)).Sum();

            double xAndyProductSum = x.Zip(y, (value1, value2) => value1 * value2).Sum();

            double n = x.Count();

            return ((n * xAndyProductSum) - (xSum * ySum)) / Math.Sqrt(((n * xSquaredSum) - xSumSquared) * ((n * ySquaredSum) - ySumSquared));
        }

 


@afhacker

afhacker
21 Sep 2018, 07:16

        public static double GetCorrelation(DataSeries dataSeries, DataSeries otherDataSeries)
        {
            double[] values1 = new double[dataSeries.Count];
            double[] values2 = new double[dataSeries.Count];

            for (int i = 0; i < dataSeries.Count; i++)
            {
                values1[i] = dataSeries.Last(i);
                values2[i] = otherDataSeries.Last(i);
            }

            var avg1 = values1.Average();
            var avg2 = values2.Average();

            var sum = values1.Zip(values2, (x1, y1) => (x1 - avg1) * (y1 - avg2)).Sum();

            var sumSqr1 = values1.Sum(x => Math.Pow((x - avg1), 2.0));
            var sumSqr2 = values2.Sum(y => Math.Pow((y - avg2), 2.0));

            return Math.Round(sum / Math.Sqrt(sumSqr1 * sumSqr2), 2);
        }

This function returns the correlation between two data series.


@afhacker

afhacker
01 Aug 2018, 07:49 ( Updated at: 21 Dec 2023, 09:20 )


@afhacker

afhacker
23 Jul 2018, 16:39

Finally some real improvement!

Please add the platform time zone as a property in form of a TimeZoneInfo object so the developer will be able to know what's the user platform time zone setting, I don't know why you haven't added it yet.


@afhacker

afhacker
28 Jun 2018, 07:50

RE:

irmscher9 said:

Hey guys

Is it possible to STOP all the running cBots with a piece of code?

Cheers

You can do it with named pipe server and some other methods.


@afhacker

afhacker
21 Jun 2018, 07:23

RE:

PapaGohan said:

Pivot points with sup/res is available on every other platform I have tried. Is this something in the works? Could it be added to some sort of "todo list"?

FX Trading Station has the ability to add 6 different types of pivot points:

  • Classic pivot
  • Camarilla
  • Woodie
  • Fibonacci
  • Floor
  • Fibonacci retracement

It's super useful, having anything like this built in would be great!

Five different types of pivot points indicator for cTrader: https://www.algodeveloper.com/product/pivot-points/


@afhacker

afhacker
13 Jun 2018, 15:01

RE:

Panagiotis Charalampous said:

Dear Trader,

Thanks for posting in our forum. This is currently not possible in cAlgo. A workaround is to get the Color as a string parameter and use the following function to convert the string to a Color

        //A function for getting the color from a string
        private Colors GetColor(string colorString)
        {
            foreach (Colors color in Enum.GetValues(typeof(Colors)))
            {
                if (color.ToString() == colorString)
                    return color;
            }
            return Colors.White;
        }

Let me know if this helps,

Best Regards,

Panagiotis

 

Simple method:

        private Colors GetColor(string colorText, string colorParameterName)
        {
            Colors color;

            if (!Enum.TryParse(colorText, true, out color))
            {
                string errorObjName = string.Format("Your input for '{0}' parameter is incorrect", colorParameterName);

                ChartObjects.DrawText("Error", errorObjName, StaticPosition.Center, Colors.Red);

                // throw new ArgumentException(errorObjName);
            }

            return color;
        }

 


@afhacker

afhacker
18 Mar 2018, 06:07

Supply and demand zones indicator for cTrader: https://www.algodeveloper.com/1-supply-and-demand-zones


@afhacker

afhacker
02 Mar 2018, 09:56

First thanks for adding this new features but what about community requests? where is multi-symbol backtesting? or different parameter types like Enums, date time picker,...

And is there any property to get a collection of all available symbols? that will be a simple feature to add before releasing the new version of API.

The current API library is based on .Net framework 4 which is obsolete, please update the .Net version to > 4.6 at least.

Another main issue of current API is limited drawing, please improve the API chart drawing feature by adding:

1. Transparency

2. Different shapes drawing

3. Checking current objects on chart and modifying those objects

4. A collection of objects drawn by current indicator or cBot

And please add a property to get the user platform (not system as it's available by .Net) time zone as a .Net TimeZoneInfo object.

Adding all these features will not get much time but I don't know why Spotware is very slow in adding new features?

Multi-symbol backtesting is one of the top suggestions and most voted of the community so please add it!


@afhacker

afhacker
28 Jan 2018, 08:47

+1

And please add the transparent drawing feature to cAlgo API so we will be able to define the alpha % of each chart object alongside its color.

 


@afhacker

afhacker
03 Nov 2017, 07:27

I sent you an invitation.


@afhacker

afhacker
02 Nov 2017, 20:07

Can you give me your email address? I will invite you to our Slack.


@afhacker

afhacker
02 Nov 2017, 16:04 ( Updated at: 21 Dec 2023, 09:20 )

Hi Hamid Reza,

There were some bugs in Alert library that I fixed and the new version is available, you can download your indicator which uses the new version of the alert library from here:

https://drive.google.com/open?id=0B93GK1Ip4NSMWldXRTljRTZ1ZEk


@afhacker

afhacker
31 Oct 2017, 17:28

You can download the compiled version of indicator from this link: https://drive.google.com/open?id=0B93GK1Ip4NSMdVVLbThRWjhMZmM

 

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

namespace cAlgo.Indicators
{
    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
    public class IchimokuKinkoHyo : Indicator
    {
        private int alertBarIndex = 0;

        [Parameter(DefaultValue = 9)]
        public int periodFast { get; set; }

        [Parameter(DefaultValue = 26)]
        public int periodMedium { get; set; }

        [Parameter(DefaultValue = 52)]
        public int periodSlow { get; set; }

        [Parameter(DefaultValue = 26)]
        public int DisplacementChikou { get; set; }

        [Parameter(DefaultValue = 26)]
        public int DisplacementCloud { get; set; }

        [Parameter(DefaultValue = 26)]
        public int Displacementkijunsen { get; set; }

        [Parameter(DefaultValue = 0)]
        public int Displacemenspanb { get; set; }

        [Parameter("Text Color", DefaultValue = "Black")]
        public string TextColor { get; set; }

        [Parameter(DefaultValue = true)]
        public bool Common_cross { get; set; }

        [Parameter(DefaultValue = false)]
        public bool Uncommon { get; set; }

        [Parameter(DefaultValue = true)]
        public bool Common_cross_kumo { get; set; }

        [Output("TenkanSen", Color = Colors.Red)]
        public IndicatorDataSeries TenkanSen { get; set; }

        [Output("Kijunsen", Color = Colors.Blue)]
        public IndicatorDataSeries KijunSen { get; set; }

        [Output("ChikouSpan", Color = Colors.DarkViolet)]
        public IndicatorDataSeries ChikouSpan { get; set; }

        [Output("qualityline", Color = Colors.Black)]
        public IndicatorDataSeries qualityline { get; set; }

        [Output("SenkouSpanB", Color = Colors.Red, LineStyle = LineStyle.Lines)]
        public IndicatorDataSeries SenkouSpanB { get; set; }

        [Output("SenkouSpanA", Color = Colors.Green, LineStyle = LineStyle.Lines)]
        public IndicatorDataSeries SenkouSpanA { get; set; }

        [Output("Directionline", Color = Colors.Yellow)]
        public IndicatorDataSeries Directionline { get; set; }


        private Colors color = Colors.Black;


        double maxfast, minfast, maxmedium, minmedium, maxslow, minslow, maxbig, minbig;

        protected override void Initialize()
        {
            Alert.Manager.Indicator = this;

            Alert.Manager.WindowTheme = Alert.Manager.Theme.BaseLight;
            Alert.Manager.WindowAccent = Alert.Manager.Accent.Red;

            Enum.TryParse(TextColor, out color);
        }


        public override void Calculate(int index)
        {
            if (IsLastBar)
                DisplaySpreadOnChart();
            if ((index < periodFast) || (index < periodSlow))
            {
                return;
            }

            string signalType = string.Empty;

            maxfast = MarketSeries.High[index];
            minfast = MarketSeries.Low[index];
            maxmedium = MarketSeries.High[index];
            minmedium = MarketSeries.Low[index];
            maxbig = MarketSeries.High[index];
            minbig = MarketSeries.Low[index];
            maxslow = MarketSeries.High[index];
            minslow = MarketSeries.Low[index];

            for (int i = 0; i < periodFast; i++)
            {
                if (maxfast < MarketSeries.High[index - i])
                {
                    maxfast = MarketSeries.High[index - i];
                }
                if (minfast > MarketSeries.Low[index - i])
                {
                    minfast = MarketSeries.Low[index - i];
                }
            }
            for (int i = 0; i < periodMedium; i++)
            {
                if (maxmedium < MarketSeries.High[index - i])
                {
                    maxmedium = MarketSeries.High[index - i];
                }
                if (minmedium > MarketSeries.Low[index - i])
                {
                    minmedium = MarketSeries.Low[index - i];
                }
            }

            for (int i = 0; i < periodSlow; i++)
            {
                if (maxslow < MarketSeries.High[index - i])
                {
                    maxslow = MarketSeries.High[index - i];
                }
                if (minslow > MarketSeries.Low[index - i])
                {
                    minslow = MarketSeries.Low[index - i];
                }
            }
            TenkanSen[index] = (maxfast + minfast) / 2;
            KijunSen[index] = (maxmedium + minmedium) / 2;
            ChikouSpan[index - DisplacementChikou] = MarketSeries.Close[index];
            SenkouSpanA[index + DisplacementCloud] = (TenkanSen[index] + KijunSen[index]) / 2;
            SenkouSpanB[index + DisplacementCloud] = (maxslow + minslow) / 2;
            qualityline[index + Displacementkijunsen] = (maxmedium + minmedium) / 2;
            Directionline[index] = (maxslow + minslow) / 2;

            if (KijunSen[index] == TenkanSen[index] && Common_cross)
            {
                ChartObjects.DrawVerticalLine(index.ToString(), MarketSeries.OpenTime[index], Colors.Red, 1, LineStyle.DotsVeryRare);
                ChartObjects.RemoveObject((index - 1).ToString());

                TriggerAlert(TradeType.Sell, index, "Common_cross");
            }
            if (TenkanSen.HasCrossedAbove(KijunSen, 0) && Uncommon)
            {
                ChartObjects.DrawVerticalLine(index.ToString(), MarketSeries.OpenTime[index], Colors.Green, 1, LineStyle.DotsVeryRare);
                ChartObjects.RemoveObject((index - 1).ToString());

                TriggerAlert(TradeType.Sell, index, "Uncommon");
            }
            if (KijunSen[index] == TenkanSen[index] && SenkouSpanA[index + DisplacementCloud] == SenkouSpanB[index + DisplacementCloud] && Common_cross_kumo)
            {
                ChartObjects.DrawVerticalLine(index.ToString(), MarketSeries.OpenTime[index], Colors.Blue, 1, LineStyle.DotsVeryRare);
                ChartObjects.RemoveObject((index - 1).ToString());

                TriggerAlert(TradeType.Sell, index, "Common_cross_kumo");
            }
        }

        private void DisplaySpreadOnChart()
        {
            var spread = Math.Round(Symbol.Spread / Symbol.PipSize, 2);
            string text = string.Format("{0}", spread);
            ChartObjects.DrawText("spread", "\t" + text, StaticPosition.BottomRight, Colors.Black);
        }

        private void TriggerAlert(TradeType alertType, int index, string msg)
        {
            if (index != alertBarIndex && IsLastBar && IsRealTime)
            {
                alertBarIndex = index;

                Alert.Manager.Trigger(alertType, Symbol, MarketSeries.TimeFrame, Server.Time, msg);
            }
        }
    }
}

 


@afhacker