bcn centro
bcn centro's avatar

Info

Username:kenneyy_eur
Name:bcn centro
Member since: 22 Apr 2020
Country:Spain

Favorite symbols:

EURUSD

About

None

Signature

None

Last Algorithm Comments

@MACD ZeroLag:  21 Jul 2022, 03:30


Hello,

I'm trying to improve this great indicator you released on here. I keep running into a brick wall

My aim is to add this indicator (for a higher timeframe) onto the current chart (M5).

I want to use it as a Divergence indicator. I have seen the other two you uploaded and have altered those ones, but this seems more promising.

Please help.

@New version of Snow Trader cBot:  28 Nov 2021, 21:42


Hello,

I can see that your bot produces pretty good results. I also trade XAUUSD via my bot and wonder why

1. You allow the client to select the Ma parameters instead of keeping these values fixed. 

2. You have not mentioned the actual timeframe these results were produced on.

3. You have not produced the results on the minimum amount tradeable AND with NO leverage

On a side not, how much is the code?

@Snow Trader cBot:  04 Nov 2021, 23:00


Hello,

I am impressed with the results you posted here for XAUUSD. However, i do have some concerns

1. There is no Profit Factor in ANY of the photos posted

2. When trading XAUUSD, you do not need a high leverage. A leverage of 1:2 (one to two) should suffice. 

3. You have not released a demo version for people to back-test and basically "try before they buy" Only by back-testing can a buyer truly confirm whether it is worth the $5000 you asked for.

Please upload a demo version

Regards

Kenneth

@Katana:  16 Aug 2021, 23:49


Humanity IS sharing the same currency - its called Bitcoin

@Chandelier Exit:  16 Aug 2021, 00:15


Quite good!!! - i altered the code to create a stop loss channel and explicitly reference the channel top or bottom depending on my trade direction. 

@Gold Breakout candle Free:  13 Aug 2021, 17:23


I also reran the test after moving the code from the Ontick() event to the OnBar() event and used a SL of 1000 & TP of 1000. It resulted in a bad loss!!!

@Gold Breakout candle Free:  13 Aug 2021, 17:18


Hello,

I downloaded & backtested your bot using the very same parameters you used. i.e.

Asset: XAUUSD

Timeframe: D2

From: 15/01/2020

To:     15/08/2021 (Not 2020)

SL:   500

TP:   1000  

I'm afraid i have very bad news! 

<B>-3318.74$ (-33%)</B> is the result i got. A profit factor of '0' 

I realise the bot you uploaded is not the one that gave you remarkable result you posted. May i ask for the actual bot or is this for sale?

@Trend Master:  31 May 2021, 01:22


$1000 grew to $13809 (+138%) in 30months (2.5years) - impressive but stressfull !!!

@Trend Master:  31 May 2021, 01:14


I do apologise for my earlier post!!!

Kudos to you, this cBot is the real deal. I backtested XAUUSD M30 from 01.01.2018 - 29/05/2021

It blew me away!!!

But i do have a small concern. From 22/ Apr /2019 - 10/Sept/2019 - Not a single win. Just 5 consecutive losses which were later recovered via Martin Gale. Quite risky. I can greatly improve this cBot if i have the code. How much for the code?

@MACD PIVOT POINT BOT:  12 Mar 2021, 02:37


Replace lines 104 -118 with the lines of code below

if ((Trend ? closepip > MA1 : true) && (Pricey < (PivotSupport == 1 ? S1R : (PivotSupport == 2 ? S2R : (PivotSupport == 3 ? S3R : S4R)))) && longPosition == null)

{

       if (_MACD.MACD.Last(1) < _MACD.Signal.Last(1) && _MACD.MACD.Last(0) > _MACD.Signal.Last(0) && _MACD.Signal.Last(0) < 0)

       {

         ExecuteMarketOrder(TradeType.Buy, Symbol, Symbol.NormalizeVolume(Volume), Label, StopLoss, TakeProfit);

        }

}

if ((Trend ? closepip < MA1 : true) && (Pricey > (PivotResistance == 1 ? R1R : (PivotResistance == 2 ? R2R : (PivotResistance == 3 ? R3R : R4R)))) && shortPosition == null)

{

      if (_MACD.MACD.Last(1) > _MACD.Signal.Last(1) && _MACD.MACD.Last(0) < _MACD.Signal.Last(0) && _MACD.Signal.Last(0) > 0)

  {

         ExecuteMarketOrder(TradeType.Sell, Symbol, Symbol.NormalizeVolume(Volume), Label, StopLoss, TakeProfit);

   }

}

@Trend Trader Robot by prop trader:  08 Mar 2021, 18:34


"IT DOES NOT USE Dangerous systems like the Grid" -  A grid is not a dangerous system but quite the opposite. It is a system that involves two or more timeframes to determine trend direction

Last Forum Posts

@Problem on indicator performance:  05 Nov 2021, 16:38


Here is my code

    [Indicator(IsOverlay = true, AccessRights = AccessRights.None)]
    public class KF_GHL_v3 : Indicator
    {
        [Parameter("Period", DefaultValue = 10)]
        public int Period { get; set; }

        [Parameter(DefaultValue = "High")]
        public DataSeries SourceH { get; set; }

        [Parameter(DefaultValue = "Low")]
        public DataSeries SourceL { get; set; }

        [Parameter(DefaultValue = "Close")]
        public DataSeries SourceC { get; set; }

        [Parameter("Timeframe", DefaultValue = "Minute5")]
        public TimeFrame Timeframe { get; set; }

        [Parameter(DefaultValue = MovingAverageType.Simple)]
        public MovingAverageType MaType { get; set; }


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


        private MovingAverage _smaHigh;
        private MovingAverage _smaLow;

        private int Hld, Hlv;
        private Bars bars;

        protected override void Initialize()
        {
            if(this.Timeframe != this.Chart.TimeFrame)
            {
                bars = MarketData.GetBars(Timeframe);

                while (bars.OpenTimes[0] > Bars.OpenTimes[0])
                    bars.LoadMoreHistory();

                SourceH = bars.HighPrices;
                SourceL = bars.LowPrices;
                SourceC = bars.ClosePrices;
            }

            _smaHigh = Indicators.MovingAverage(SourceH, Period, MaType);
            _smaLow =  Indicators.MovingAverage(SourceL, Period, MaType);
        }

        public override void Calculate(int index)
        {
            var index1 = this.Timeframe == this.Chart.TimeFrame ? index : bars.OpenTimes.GetIndexByTime(Bars.OpenTimes[index]);
            if (index1 < 1) return;

            double close = SourceC[index1];
            double smaHigh = _smaHigh.Result[index1 - 1];
            double smaLow = _smaLow.Result[index1 - 1];

            if (close > smaHigh)
                Hld = 1;
            else
            {
                if (close < smaLow)
                    Hld = -1;
                else
                    Hld = 0;
            }

            if (Hld != 0) Hlv = Hld;

            switch(Hlv)
            {
                case -1: Result[index] = smaHigh; break;
                case 0: Result[index - 1] = double.NaN; break;
                case 1: Result[index] = smaLow; break;
            }
        }
    }

It is simply plotting a moving average line of a higher timeframe than the current chart.  This is needed when trading!

When this indicator is placed onto a XAUUSD M5 chart and set to the following parameters

Period: 272

MaType: TimeSeries

Timeframe : 15 minutes

Then run back test, that's when the issue occurs

@Stop C Trader automatically removing my indicators:  05 Nov 2021, 16:30


PanagiotisCharalampous said:

Hi Justine,

As per the message you receive, some indicators are not appropriately coded and cause serious degradation of performance to cTrader. Unfortunately we cannot allow those indicators to continue running, since they serously affect the stability of the platform. You should reach out to the indicator developer to fix the issue.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook

using cAlgo.API;
using cAlgo.API.Indicators;

namespace cAlgo.Indicators
{
    [Indicator(IsOverlay = true, AccessRights = AccessRights.None)]
    public class KF_GHL_v3 : Indicator
    {
        [Parameter("Period", DefaultValue = 10)]
        public int Period { get; set; }

        [Parameter(DefaultValue = "High")]
        public DataSeries SourceH { get; set; }

        [Parameter(DefaultValue = "Low")]
        public DataSeries SourceL { get; set; }

        [Parameter(DefaultValue = "Close")]
        public DataSeries SourceC { get; set; }

        [Parameter("Timeframe", DefaultValue = "Minute5")]
        public TimeFrame Timeframe { get; set; }

        [Parameter(DefaultValue = MovingAverageType.Simple)]
        public MovingAverageType MaType { get; set; }


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


        private MovingAverage _smaHigh;
        private MovingAverage _smaLow;

        private int Hld, Hlv;
        private Bars bars;

        protected override void Initialize()
        {
            if(this.Timeframe != this.Chart.TimeFrame)
            {
                bars = MarketData.GetBars(Timeframe);

                while (bars.OpenTimes[0] > Bars.OpenTimes[0])
                    bars.LoadMoreHistory();

                SourceH = bars.HighPrices;
                SourceL = bars.LowPrices;
                SourceC = bars.ClosePrices;
            }

            _smaHigh = Indicators.MovingAverage(SourceH, Period, MaType);
            _smaLow =  Indicators.MovingAverage(SourceL, Period, MaType);
        }

        public override void Calculate(int index)
        {
            var index1 = this.Timeframe == this.Chart.TimeFrame ? index : bars.OpenTimes.GetIndexByTime(Bars.OpenTimes[index]);
            if (index1 < 1) return;

            double close = SourceC[index1];
            double smaHigh = _smaHigh.Result[index1 - 1];
            double smaLow = _smaLow.Result[index1 - 1];

            if (close > smaHigh)
                Hld = 1;
            else
            {
                if (close < smaLow)
                    Hld = -1;
                else
                    Hld = 0;
            }

            if (Hld != 0) Hlv = Hld;

            switch(Hlv)
            {
                case -1: Result[index] = smaHigh; break;
                case 0: Result[index - 1] = double.NaN; break;
                case 1: Result[index] = smaLow; break;
            }
        }
    }
}

It is simply plotting a moving average line of a higher timeframe than the current chart.  This is needed when trading!

When this indicator is placed onto a XAUUSD M5 chart and set to the following parameters

Period: 272

MaType: TimeSeries

Timeframe : 15 minutes

Then run back test, that's when the issue occurs

@Folder structure for cBots and Indicators:  01 Oct 2021, 21:42


Uccio said:

PanagiotisCharalampous said:

Hi davewilson347,

Thanks for posting in our forum. There is no such option at the moment.

Best Regards,

Panagiotis

Hi, this feature would be necessary. It becomes impossible to handle indicators when you download just some of them.

I totally agree!!! - MT4/5 has this feature.  Ability to place a set of indicators into a single folder is desperately needed.

@Consequences of running cbot for too long.:  01 Oct 2021, 21:38


ilive said:

When running CBot for a long time will affect the connection with ctrader, I tried deleting the app and reinstalling it but it's still the same.
Anyone know a way to go back to the beginning? Or do you know any other reason? Thank you very much .

Try reducing the number of for loops in your OnBar() or OnTick() event.  Best to use just 1 for-each / for loop and your bot wont grind to a halt overtime

@MarketData.GetBarsAsync():  22 Apr 2020, 17:53


PanagiotisCharalampous said:

Hi  again,

I have learnt something new thanks to you. 

My market scanner has to scan over 70 symbols and for each symbol it has to load the bars for 5 timeframes i.e 70 X 5  = 350 iterations = 52 seconds (synchronously)

A lot of time.

Ok, never mind and thanks for your help. I will go digging and find the right way to implement this without the Print line.

Regards

Kenneth

Hi Kenneth,

It will be empty because that line of code will be executed before the bars are retrieved. That's the whole point of asynchronous execution, to proceed with the execution of the main thread while another task is executed in parallel on the side. Why do you need to use GetBarsAsync() and not just GetBars()?

Best Regards,

Panagiotis 

Join us on Telegram

@MarketData.GetBarsAsync():  22 Apr 2020, 17:31


Hi Panagiotis and thanks for your quick response.

You are able to see something because you added the print line below the collection population line.

If you remove the print line and try accessing the collection below the MarketData.GetBarAsync block. The collection will be empty trust me.

I can add the print line to my code, but i know i need to add the bars to a Task<IEnumerable>  that's where i'm stuck . Once i achieve that, then i'm home and dry.

Deep appreciation for the work you do!

Regards

Kenneth

PanagiotisCharalampous said:

Hi Kenneth,

I am not sure what is the problem. The below seems to be working fine for me

            var lbrs = new List<Bars>();
            MarketData.GetBarsAsync(TimeFrame, Symbol.Name, bars =>
            {
                lbrs.Add(bars);
                Print(lbrs.Count + " Bar collection added");
            });

Best Regards,

Panagiotis 

Join us on Telegram

@MarketData.GetBarsAsync():  22 Apr 2020, 16:44


Hello,

I have been struggling to get the code below to populate my collection straight-away.  It returns nothing,

                MarketData.GetBarsAsync(tf, asset, bars =>
                {
                    lbrs.Add(bars);
                });

i need to await the result - but how?  Please help!

Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.

No uploaded.

Warning! Executing cBots downloaded from this section may result in loss of funds. Use them at your own risk.

No uploaded.