Replies

thomas.abele
16 Nov 2022, 14:38 ( Updated at: 21 Dec 2023, 09:23 )

RE:

thanks Max! I found it.


@thomas.abele

thomas.abele
16 Nov 2022, 13:12

how could you install version 4.1?

Hi Xammo,

may I ask, how could you install version 4.1?

I want to install old version 4.1, because newer versions have so many issues. But so far without success.

Any help is highly appreciated.

Thanks and Best Regards

Thomas

 


@thomas.abele

thomas.abele
29 Sep 2022, 14:30 ( Updated at: 21 Dec 2023, 09:22 )

RE:

PanagiotisCharalampous said:

Hi Thomas,

The screenshot you sent is not related to 

When running for a while the Bollinger Bands are not updated any more, LastValue gives back an old value! Is this a known bug?

We are not able to assess if there is a problem and what it is,  unless we have some source code that reproduces the issue. 

Best Regards,

Panagiotis 

Join us on Telegram and Facebook

the screen shot is related to to the second issue

it can be easily reproduced, just copy any cbot to another pc and run it for a few days, then switch the symbol and it will look as below, no chance to get the chart, you have to restart cTrader. I know I don't have this issue on my development pc where I build the algo file. That happens if you copy only the algo file to another pc.


@thomas.abele

thomas.abele
29 Sep 2022, 12:59 ( Updated at: 21 Dec 2023, 09:22 )

RE:

PanagiotisCharalampous said:

Hi Thomas,

We are not aware of any issues. To be able to address it we will need to source code and steps to reproduce.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook

Hi Panagiotis,

that sounds not good, of course I cannot share the cBot code as it is a working, money making cBot.

cTrader looks like this below if you switch the symbol.

Just copy any cbot to another pc and run it for a few days, then switch the symbol and it will look as below, no chance to get the chart, you have to restart cTrader.


@thomas.abele

thomas.abele
31 Mar 2022, 21:34 ( Updated at: 21 Dec 2023, 09:22 )

RE:

amusleh said:

Hi,

I just tested your code on EURUSD and it works fine, there are enough weekly bars for the moving average.

If bars.LoadMoreHistory() doesn't load enough bars then it means there is not enough historical bars for that symbol time frame.

The code I tested:

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

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class MTissue : Robot
    {
        [Parameter("MA TimeFrame", DefaultValue = "Weekly")]
        public TimeFrame MATimeFrame { get; set; }

        [Parameter("MA Period", DefaultValue = 200)]
        public int MAPeriod { get; set; }

        [Parameter("MA Type", DefaultValue = MovingAverageType.Simple)]
        public MovingAverageType MAType { get; set; }

        private MovingAverage _ma;

        protected override void OnStart()
        {
            var bars = MarketData.GetBars(MATimeFrame);

            while (bars.Count < MAPeriod * 2)
            {
                var numberOfLoadedBars = bars.LoadMoreHistory();

                Print(numberOfLoadedBars);

                if (numberOfLoadedBars < 1) break;
            }

            Print(bars.Count);

            _ma = Indicators.MovingAverage(bars.ClosePrices, MAPeriod, MAType);
        }

        protected override void OnTick()
        {
            Print("distance={0}", _ma.Result.LastValue.ToString("f2"));
        }
    }
}

Result:

31/03/2022 15:12:37.740 | CBot instance [New cBot, EURUSD, h1] started.
31/03/2022 15:12:38.599 | 1596
31/03/2022 15:12:39.662 | distance=1.15
31/03/2022 15:12:39.958 | distance=1.15
31/03/2022 15:12:40.396 | distance=1.15
31/03/2022 15:12:41.162 | distance=1.15
31/03/2022 15:12:41.505 | distance=1.15
31/03/2022 15:12:42.474 | CBot instance [New cBot, EURUSD, h1] stopped by user.

 

Hi Ahmad,

I tried with cTrader 4.1 ICMarkets and TopFX without success. Bars count is only 99 and then MA result is NAN.

Do you use CTrader 4.2?

Best Regards
Thomas


@thomas.abele

thomas.abele
01 Jan 2020, 12:08

RE: precision if stopLoss or takeProfit is specified in pips

PanagiotisCharalampous said:

Hi FireMyst,

Backtesting is a simulation of the trading on your machine. It does not communicate with the server and it does not account for all possible parameretes of a cBot's runtime. The specific error is sent by the server where the checks are a bit more strict. I would advise you to test your cBots on a demo account as well before moving to a live trading account.

Best Regards,

Panagiotis 

Hi Panagiotis,

I saw for most Symbols the precision for stopLoss or takeProfit specified in pips is 1 digit. But for e.g. XAUUSD it is 0 digits.

Is there a way to find out programatically what the precision is?

Kind Regards,

Thomas


@thomas.abele

thomas.abele
01 Feb 2018, 13:11 ( Updated at: 01 Feb 2018, 13:12 )

Your cTID has not been verified yet. Login to cTDN is only allowed to verified cTID accounts. Please verify your cTID account and try to login again.
Since months it is not verified. How to verify it?


@thomas.abele