DelFonseca's avatar
Del Fonseca
Del Fonseca's avatar


Name:Del Fonseca
Member since: 25 Jun 2017

Favorite symbols:






Last Algorithm Comments

@Information Pad:  11 Aug 2021, 00:09

Congratulations on this excellent work, a beautiful panel! Just a suggestion, at line 725: Chart.IsScrollingEnabled = false; set it to true, so after moving the panel with CTRL + Mouse, the movement of the chart doesnt get blocked. Congratulations again.

@Self updated Asia/Europe/US Market Hours:  11 Jul 2019, 01:26

Congratulations!! I tried insert Australian time but says it does not find "htmlagilitypack.dll" even though the orginal indicator works. Without any modification gives the same error. Thanks

@Renko:  04 Jul 2019, 23:28

Why changing timeframes, this renko indicator changes the bricks? It's not supposed, right?

@cTrader Volatility Alert:  21 Jan 2018, 23:38

Solved .

@cTrader Volatility Alert:  20 Jan 2018, 23:36

Hello, first of all, congratulations, awesome indicator. I tried to make a change but i cant and i need your help. The idea is if Buyers are superior to sellers, highlight buyers 'color, for example, it stays green and sellers' color is gray. Can you help me with the code? i cant make IF structure because are difrent methods and i dont know convert. Thank you

Last Forum Posts

@Rating function for cTrader Copy strategies:  10 Sep 2021, 00:29

Please view the image for a better understanding.

(1) Average rating
(2) Here we can rating from 1 to 5 stars
(3) Search by rating (It would not be a priority, so it would be possible to start having enough ratings)

The rating must be registered in the database through the cTID, if this cTID is changed, the rating disappears, this can reduce the impostors/scammers from constantly changing cTID and rating their strategy.



@[TUTORIAL] Windows forms:  14 Jun 2021, 20:27

amusleh said:


To use WinForms on your cBot/Indicator, you have to follow these steps:

  • (...)

Open it with VS to see the cBot full code.

Thank you so much for your hel, it was perfect!!

@[TUTORIAL] Windows forms:  12 Jun 2021, 21:12


There is little documentation how to interact with forms created in Visual Studio, somenone can create a "how to do this" tutorial for future references?

1) Create in VS a form (named "MainForm") with:
 - Gray background
 - ComboBox with some symbol's name's
 - TextBox for Volume
 - TextBox for Label
 - Current Ask and Bid price's for user reference
 - Buy and Sell button's (with the respective green and orange colors).

2) When the Buy or Sell button is pressed, another form appears (named "formTrade") saying "Trade was successfully executed.", this one will have a close button.

3) Load the form "MainForm" in cTrader and execute it on OnStart().

With this tutorial it will be possible learn:
- Load and interact with fully forms created in VS
- Load information contained in cTrader in the form (Ask and Bid prices)
- Execute cTrader instructions via form (Buy and Sell button's)

I really appreciate any suport!!


@Max Balance Drawdown with different values:  10 Feb 2021, 10:27


In cTrader copy, we can check the "Max Balance Drawdown" in 2 different tables, "Summary" and "Trades. The problem is that value differs between tables.
I checked several strategies and the situation is the same.

Below is the link to my strategy and print screen to confirm.


@Backtesting with Renko and Range bars?:  23 Jul 2020, 23:51

PanagiotisCharalampous said:

Hi ghcaplan,

Thanks for posting in our forum. No this is still not possible.

Best Regards,



Forecasts for renko backtesting

Best Regards

@Ctrader Renko Backtest:  23 Jul 2020, 23:49


@Daily Starting Account.Balance:  23 Jun 2020, 01:58

Jiri said:

Hi, try this: 

History.Any() ? History.Last(x => x.ClosingTime.Date < Time.Date).Balance : Account.Balance

Thank you very much for your help. Work perfectly!
Best regards

@Daily Starting Account.Balance:  22 Jun 2020, 19:57

Hello, I need get the Account.Balance from the beginning of the day, the following code does not work, can someone help me?
It's important if the robot is disconnected after making trades, when connecting it will not be able to count the trades performed, hence the need to access the history.

HistoryDailyStartingBalance = History.Where(x => x.ClosingTime.Date.Day == Server.Time.Date.Day).OrderByDescending(x => x.EntryTime).Last().Balance;

Thank you

@Get historical trades trough layer:  22 Jan 2020, 20:30

PanagiotisCharalampous said:


Thank you so much, you rock!!.

@Get historical trades trough layer:  21 Jan 2020, 20:12

PanagiotisCharalampous said:

Hi DelTrader,

Can you please post the complete cBot code so that we can have a look?

Best Regards,


Join us on Telegram

Thank you very much for your reply!

The robot has almost 8 thousand lines with arrays and connections to databases, I created a basic one to facilitate you and the situation is the same.

Start cBot a stop. Close manually opened trades to be part of the history, after that starts cBot again and confirms that the 'HistoricalProfitInCash' in the 'Chart.DrawStaticText' will significantly change tick by tick and meaningless.

Please check. I am grateful to you!!

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

namespace cAlgo.Robots
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class Teste : Robot
        [Parameter("1st Symbol", Group = "First Symbol", DefaultValue = "EURUSD")]
        public string FirstSymbol { get; set; }
        [Parameter("Lote: Buy Symbol", Group = "First Symbol", DefaultValue = 0.01, MinValue = 0.01)]
        public double QuantityToFirst { get; set; }

        [Parameter("2nd Symbol", Group = "Second Symbol", DefaultValue = "USDJPY")]
        public string SecondSymbol { get; set; }
        [Parameter("Lote: Sell Symbol", Group = "Second Symbol", DefaultValue = 0.01, MinValue = 0.01)]
        public double QuantityToSecond { get; set; }

        [Parameter("Date (ddMMyyyy)", Group = "Settings", DefaultValue = "21012020")]
        public string TodaysDate { get; set; }

        private double VolumeInUnitsFirst
            get { return Symbol.QuantityToVolumeInUnits(QuantityToFirst); }
        private double VolumeInUnitsSecond
            get { return Symbol.QuantityToVolumeInUnits(QuantityToSecond); }

        private Symbol FirstSymbolGetSymbol, SecondSymbolGetSymbol;
        private const string Label = "Teste -  ";
        private int _FirstSymbolCount, _SecondSymbolCount;
        private double HistoricalProfitInCash;

        protected override void OnStart()
            HistoricalProfitInCash = 0;
            FirstSymbolGetSymbol = Symbols.GetSymbol(FirstSymbol);
            SecondSymbolGetSymbol = Symbols.GetSymbol(SecondSymbol);

        protected override void OnTick()

            _FirstSymbolCount = Positions.Where(p => p.Label == Label + "1stSymbol " + FirstSymbol + " 2ndSymbol " + SecondSymbol + " - " + TodaysDate).Where(p => p.TradeType == TradeType.Buy).Count(p => p.SymbolName == FirstSymbol);
            _SecondSymbolCount = Positions.Where(z => z.Label == Label + "1stSymbol " + FirstSymbol + " 2ndSymbol " + SecondSymbol + " - " + TodaysDate).Where(z => z.TradeType == TradeType.Buy).Count(z => z.SymbolName == SecondSymbol);

            if (_FirstSymbolCount == 0)
                ExecuteMarketOrder(TradeType.Buy, FirstSymbolGetSymbol.Name, VolumeInUnitsFirst, Label + "1stSymbol " + FirstSymbol + " 2ndSymbol " + SecondSymbol + " - " + TodaysDate, 0, 10);
            if (_SecondSymbolCount == 0)
                ExecuteMarketOrder(TradeType.Buy, SecondSymbolGetSymbol.Name, VolumeInUnitsSecond, Label + "1stSymbol " + FirstSymbol + " 2ndSymbol " + SecondSymbol + " - " + TodaysDate, 0, 10);

        private void HistoricalTradeByLabel()
            //foreach (HistoricalTrade trade in History.FindAll(Label + "1stSymbol " + FirstSymbol + " 2ndSymbol " + SecondSymbol + " - " + TodaysDate))
            foreach (HistoricalTrade trade in History)
                //if (trade.Label.Contains(Label + "1stSymbol " + FirstSymbol + " 2ndSymbol " + SecondSymbol + " - " + TodaysDate))
                if (trade.Label == (Label + "1stSymbol " + FirstSymbol + " 2ndSymbol " + SecondSymbol + " - " + TodaysDate))
                    HistoricalProfitInCash += trade.NetProfit;
            Chart.DrawStaticText("LabelOutputForTeste", NewLine(10) + "HistoricalProfitInCash: " + HistoricalProfitInCash + " €", VerticalAlignment.Top, HorizontalAlignment.Right, Color.Yellow);

        private string NewLine(int n)
            return new string('\n', n);
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.