Topics
24 Oct 2020, 15:02
 4
 1632
 1
20 Aug 2020, 12:10
 8
 1533
 1
25 Jun 2020, 12:05
 2012
 3
22 May 2020, 10:18
 3
 1250
 1
14 May 2020, 10:54
 2
 1979
 4
14 May 2020, 10:33
 4
 1422
 1
03 May 2020, 11:42
 2
 1401
 1
03 May 2020, 11:36
 3
 1236
 1
03 May 2020, 11:32
 10
 2530
 5
27 Apr 2020, 18:28
 3
 1155
 1
27 Apr 2020, 18:23
 3
 1188
 1
27 Apr 2020, 12:08
 3
 1157
 1
27 Apr 2020, 12:05
 2
 1192
 1
23 Apr 2020, 11:33
 15
 1980
 1
23 Apr 2020, 11:24
 4
 1465
 1
Replies

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

afhacker
30 Oct 2017, 20:37

RE: https://ctdn.com/algos/cbots/show/257

john123321 said:

fix the algo /algos/cbots/show/257....we are c trader users we require good support or we will stop using...look into to the algo its not working....

The cTDN cBots / indicators aren't developed by Spotware, you can find similar cBot with much more features here: 

https://www.algodeveloper.com/35-cnews


@afhacker

afhacker
12 Oct 2017, 10:11 ( Updated at: 23 Jan 2024, 13:16 )

RE: RE:

hamidreza.taali@gmail.com said:

afhacker said:

You can use my alert library: [/algos/indicators/show/1425]

thanks a lot.

i have erro for signal type.

Error CS0103: The name 'buy' does not exist in the current context?

 

help me..

 

Can you post your code?


@afhacker

afhacker
11 Oct 2017, 22:33 ( Updated at: 23 Jan 2024, 13:16 )

You can use my alert library: [/algos/indicators/show/1425]


@afhacker

afhacker
11 Oct 2017, 08:52

RE: RE:

anjupeguforex@gmail.com said:

afhacker said:

try this: /algos/indicators/show/1425

Alert.dll is not available .Please help me.

I just updated it and added the DLL files download link with a new test indicator.


@afhacker

afhacker
10 Oct 2017, 22:41

try this: /algos/indicators/show/1425


@afhacker

afhacker
10 Oct 2017, 09:10 ( Updated at: 15 Jan 2024, 14:51 )

Try this: [/algos/show/1425]


@afhacker

afhacker
25 Sep 2017, 12:17

Use account API deals request.


@afhacker

afhacker
21 Sep 2017, 21:19

We can help you, contact us: https://www.algodeveloper.com/contact-us


@afhacker

afhacker
19 Sep 2017, 21:29

Use string then parse it:

using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;
using System.IO.Pipes;
using System.Globalization;

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class Blank : Robot
    {
        private TimeSpan userTimeZone;

        [Parameter("Time Zone(UTC)", DefaultValue = "10:00:00")]
        public string UserTimeZone { get; set; }

        protected override void OnStart()
        {
            userTimeZone = TimeSpan.Parse(UserTimeZone, CultureInfo.InvariantCulture);
        }

        protected override void OnTick()
        {
        }

        protected override void OnStop()
        {
        }
    }
}

 


@afhacker

afhacker
12 Sep 2017, 13:44

You can use FF weekly calendar XML link: https://cdn-nfs.forexfactory.net/ff_calendar_thisweek.xml


@afhacker

afhacker
10 Sep 2017, 18:45

RE:

ripupo88 said:

That is my question. Who sells a bot in 20, 30 or 50$. Which one you can make hundreds of dollars with it?

 

"With my bot you can make 1000$ a month, I sell it for 50$ " ¿¿¿¿¿REALLY?????

 

No one will sell a profitable algo like that! those who sell algos and promise you x% of return per month or annually are certainly scammers.


@afhacker

afhacker
22 Aug 2017, 11:17

The API library .Net version is also updated to latest .Net version?


@afhacker

afhacker
08 Jun 2017, 14:21 ( Updated at: 21 Dec 2023, 09:21 )

TradingView type economic calendar for cTrader: https://www.algodeveloper.com/product/chart-calendar/


@afhacker

afhacker
06 Jun 2017, 13:30

VWAP indicator for cTrader: https://www.algodeveloper.com/10-vwap


@afhacker

afhacker
22 Apr 2017, 14:24

RE:

forumnock said:

Hello,

I've just tried to repack the vsix file as described in another post (my goal is to edit calgo code in visual studio).

The visual studio editor just not open.

 

1 - Is possible to use the 2017?

2 - Should i download the 2015? From where.

 

Best regard

 

Marcello

I use VS 2015 and it works fine.

VS 2015 community edition download link: https://go.microsoft.com/fwlink/?LinkId=615448&clcid=0x409


@afhacker

afhacker
07 Dec 2016, 14:33

RE: RE: RE: RE:

testpossessed said:

Agreed, something is causing an error as they process the .algo file uploaded.

I heard back from them again yesterday and it seems they have accepted there might be something wrong their end and have passed the problem along to a developer.

Great! really thanks for following this problem.


@afhacker

afhacker
06 Dec 2016, 16:12 ( Updated at: 15 Jan 2024, 14:51 )

RE: RE:

testpossessed said:

I have had the same problem for some time.

I used the feedback feature in cAlgo to try to get some help, and they are talking to me, but not getting anywhere.

So far they suggested

  1. Clearing browser history
  2. Using Icognito Mode

I tried both and got the same result, using a completetly vanilla indicator created in cAlgo, bult and uploaded with no changes.

I am a professional developer and know what I would be looking at to fix it.  I have suggested they check their web logs to see if they can identify the underlying error and let me know what it is.  Awaiting their response.

Thanks for your reply!

The problem is with upload, If I edit my current indicators or cBots on cTDN without changing the file it will be saved without any problem, example:

[/algos/show/1437]

But If I change the file I will get that 500 error so basiclly there is something going wrong with uploading maybe their server configuration have some problem that doesn't allows uploading.

 


@afhacker