PanagiotisCharalampous's avatar
PanagiotisCharalampous
26 follower(s) 0 following 1006 subscription(s)
Replies

PanagiotisCharalampous
12 Oct 2020, 09:34

Hi snowchilli,

The formulas are 

Typical Price = (High+Low+Close)/3

Weighted Close = (Close*2+High+Low)/4

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
12 Oct 2020, 09:03

Hi Shares4UsDevelopment,

It also sounds weird that you get time to rewrite the indicators but you don't get time to share the code with us, even privately, or write a simple cBot that reproduces the problem. 

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
12 Oct 2020, 08:51

Hi Shares4UsDevelopment,

Unfortunately there is not much we can do without some code to reproduce the problem.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
12 Oct 2020, 08:47

HI WB,

You can use the DrawText() method.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
12 Oct 2020, 08:43

Hi notzen,

To remove demo accounts, you need to contact your broker.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
12 Oct 2020, 08:42

Hi there,

Check the Sample cBot Reference SMA provided with cTrader to see how you can reference an indicator inside the cBot.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
12 Oct 2020, 08:38

Hi snowchilli,

Can you make your question more specific? Which new indicators?

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
12 Oct 2020, 08:37

Hi Yuval,

Did you talk to your broker? Is it the same broker and account? Can you provide screenshots that show the broker and the account number?

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
12 Oct 2020, 08:32

Hi star_indark,

If you need somebody to develop something for you, you can always post a Job or hire a Consultant.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
12 Oct 2020, 08:23

Hi mcho911,

This is an old thread so probably you are facing different issues. Please send us some troubleshooting information as per the instructions above

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
09 Oct 2020, 15:09

Hi star_indark,

See below an example on how to read MACD and RSI values from a custom indicator

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

namespace cAlgo
{
    [Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class NewIndicator : Indicator
    {
        [Parameter(DefaultValue = 0.0)]
        public double Parameter { get; set; }

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

        MacdCrossOver _macd;
        RelativeStrengthIndex _rsi;
        protected override void Initialize()
        {
            _macd = Indicators.MacdCrossOver(26, 12, 9);
            _rsi = Indicators.RelativeStrengthIndex(Bars.ClosePrices, 14);
        }

        public override void Calculate(int index)
        {
            Print("MACD: " + _macd.MACD[index]);
            Print("RSI: " + _rsi.Result[index]);
        }
    }
}

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
09 Oct 2020, 10:12

Hi xammo,

I am fed up with it so decided to write the following code in an attempt to catch the issue but every time the disconnect happens the bot (below) has stopped and no email is sent (email setup is 100% ok/the other bots running fire off emails no problems) so

The events provided by the cBot are triggered only when the server disconnects you for any reason. When disconnections occur for any other reason beyond our control (e.g. bad connection, poor server performance) then these events will not be triggered.  

please advise what is wrong with the code or how I can achieve the desired results of sending emails every time a connect/disconnect happens

Based on the above, probably the events were not triggered at all. Also if your disconnection is caused by a general internet disconnection, obviously no emails will be sent

But also just to add Panagiotis with all due respect I think you and I both know that a single point of failure in any system is not ‘good enough’ and using a recommended VPS is still a single point of failure no matter which way you look at it

We recommend this as the first step to take for your cBot to run 24/7. Frequent infrastructure outages is something you need to check before proceeding with a software solution to the problem. Disconnections every some hours should not be the case. Is your VPS provider reliable? Where is your VPS located? What is the ping time? Do your machine specs meet the recommended requirements? Can it handle your cBot execution efficiently? In any case, if you need fault tolerance, this is something you need to develop it yourself, since a cBot is your software.

 I have seen other posts going back 5+ years that are requesting greater fault tolerance and resilience of cTrader such as being able to autostart bots if a machine restarts unexpectedly/system crash

Here it is

 

 I really think Spotware need to start putting some effort into making their software (up for an award I think I saw - hope that goes well!) more resilient (for example why isn’t there already a built in tick box in the settings to send an email on server connect/disconnect?)

Our part of the software is fault tolerant. Our servers are up and running for 10 years now and we had no downtime yet.

(for example why isn’t there already a built in tick box in the settings to send an email on server connect/disconnect?)

As explained above, we cannot know if there is any issue on your side. You need to handle these cases yourself.   

 what about developing the ability I already spoke about where the same bot can run concurrently on different machines (multiple machines managing the same code/positions at the same time - I am  sure that would win Spotware many awards! :)

The same cBot can run concurrently on different machines. Nothing prevents you from doing so. But you need to handle the concurrency issues yourself, since it is your logic that is being executed. This is not something cTrader can handle for you, cTrader is just the platform for your strategy to be executed on. It is like asking from a multicore CPU to do the parallel programming for you. This is not possible. If you need concurrency, you need to write the cBot code in a way that it can run concurrently on many machines. 

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
09 Oct 2020, 07:48

Hi linton.nkambule,

You can always ask for professional assistance by posting a Job or contacting a Consultant.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
08 Oct 2020, 15:02

Hi Alex,

The best thing would be use Visual Studio for your development. cTrader Automate editor is very primitive compared to Visual Studio.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
08 Oct 2020, 09:42

Hi jayteasuk,

It seems you are using Open API 1.0 to develop your application. You need to use Open API 2.0 since v1.0 will be decommissioned next month.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
08 Oct 2020, 08:12

Hi ctid2568413,

I could not reproduce the issue unfortunately. Also this is not a cTrader related issue but a general WinForms programming issue. You may want to think of a different approach for your application.

Best Regards,

 

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
08 Oct 2020, 08:09

Hi m.cambria1996,

Navigate to Automate > Indicators, right click on the indicator you want to uninstall and select Delete.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
08 Oct 2020, 07:59

Hi genappsforex,

Please provide us more information on how to reproduce this error.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
08 Oct 2020, 07:56

Hi xabbu,

This happens because you are reading only the last value of the indicator here

                while (!csvParser.EndOfData)
                {
                    // Read current line fields, pointer moves to the next line.
                    string[] fields = csvParser.ReadFields();
                    _datefield = fields[0];

                    _evzValue = fields[1];

                }

You should be using collections e.g. a list and store all the values, not only the last one.

Best Regards,

Panagiotis 

Join us on Telegram 


@PanagiotisCharalampous

PanagiotisCharalampous
08 Oct 2020, 07:50

Hi Adrian,

There is no such option at the moment.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous