Topics
04 Mar 2014, 14:06
 0
 2413
 2
05 Feb 2014, 23:12
 3095
 3
11 Dec 2013, 12:45
 5088
 12
Proper debugger for calgo

completed Closed cTrader Automate

Suggestions
11 Dec 2013, 10:30
 103
 1539
 3
11 Jun 2013, 17:00
 3930
 8
Replies

ErikD
24 Feb 2014, 01:21

Most likely was the database connection lost somewhere

I go the same problem, mine however happened DURING trading (was almost a disaster for me)


@ErikD

ErikD
21 Feb 2014, 01:25

Whats wrong with an EU broker?


@ErikD

ErikD
19 Feb 2014, 11:01

+1

 

Totally agree!

 

Hope to see cTrader as the biggest trading platform in the future, you guys truly does an amazing job with this platfom


@ErikD

ErikD
24 Jan 2014, 01:14

// -------------------------------------------------------------------------------
//
//   This will draw the value of the ADX on the chart
//
// -------------------------------------------------------------------------------

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

namespace cAlgo.Indicators
{
    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC)]
    public class DrawSpread : Indicator
    {
        [Parameter(DefaultValue = 25)]
        public int Period { get; set; }

        private DirectionalMovementSystem _dms;


        protected override void Initialize()
        {
            _dms = Indicators.DirectionalMovementSystem(Period);
        }

        public override void Calculate(int index)
        {

            DisplayADXChart();
        }



        private void DisplayADXChart()
        {

            string text = string.Format("ADX: {0}", _dms.ADX.LastValue);
            ChartObjects.DrawText("Label", "ADX:", StaticPosition.TopLeft, Colors.Yellow);
            ChartObjects.DrawText("adx", text.PadLeft(12), StaticPosition.TopLeft, Colors.White);
        }
    }
}

 


@ErikD

ErikD
15 Jan 2014, 15:45

Thank you for this!

 

A thought, if this was put in an indicator window wouldn't it be possible to make it time independent?, sort of like the Tick indicator


This should also serve as a message to the team at Spotware, Platform is awesome (best platform atm next to TS) but you have been "implementing" some functions for almost a year. 

Infact it has been o long so that a user took it on to him to create his own :/


@ErikD

ErikD
18 Dec 2013, 21:37 ( Updated at: 21 Dec 2023, 09:20 )

RE:

StormeNet said:

How can I (temporarily) disable the following notifications?

Trade Signal

I tried setting Notifications to Off in the preferences menu but no prevail...

Thanks

Post the code please


@ErikD

ErikD
12 Dec 2013, 19:12

RE:

Spotware said:

Remove this line from Initialize: 

Wave = CreateDataSeries();

and add this to the beginning of the Calculate method:

            if (index < Period)
            {
                HP[index] = 0;
                Filt[index] = 0;
                return;
            }

Instead of if (index >= Period)

 

 

Thank you this fixed the problem

Just to be clear

It fixed the problem by populating HP and Filt when the index is bigger than the period.
Does this always have to be done when dealing with calculations that need the past value of it self in order to complete?


@ErikD

ErikD
12 Dec 2013, 14:20

No, the code is as I have posted in the first post with some minor changes (removed the if statement)


@ErikD

ErikD
12 Dec 2013, 13:38

In fact I seem to be getting all of the lines where I try to get the previous value wrong 

Example 

Filt[index] = c1 * (HP[index] + HP[index - 1]) / 2 + c2 * Filt[index - 1] + c3 * Filt[index - 2];

 


@ErikD

ErikD
12 Dec 2013, 13:26

Ok so I didnt manage to get it to work...

Seems like there is something wrong with the calculation 

 HP[index] = 0.5 * (1 + alpha1) * (Source[index] - Source[index - 1]) + alpha1 * HP[index - 1];

 

It does however work in my tradestation where it looks like this

HP = .5*(1 + alpha1)*(Close - Close[1]) + alpha1*HP[1];

anyone know what might be wrong?


@ErikD

ErikD
11 Dec 2013, 16:13

Thanks jeex for the reply

I will try it out in my code and post it if it works

 


@ErikD

ErikD
04 Dec 2013, 19:24

For me the solution was to re install cAlgo+trader aswell as the whole indicator map


@ErikD

ErikD
30 Jul 2013, 21:57

Thanks for the reply Atrader

The indicator is a convertaion from one of Ehlers papers

Its basicly a HighPass filter that is supposed to filter out signals over a higher noumber (default should be 48) that is then smootherd by what ehlers call a super smoother.

The indicator can be used as a standalone indicator but I have found that it is best used as a scourse for other osciliators (I have TS aswell)

The code looks good and I can tell from the indicator that it produces the result that I want, only that the period is to slow which make it that messy.

I'll see if I can find the paper and link it, the formula is in there but its basicly what I wrote in the code.

Could be with the way EasyLaunge and C prioritize code.

The alternative is that I use a libary with signal codes such as SignalLab but I rahter not :P


@ErikD

ErikD
27 Jul 2013, 12:32

Or maybe not

What I did was 

             _hp[1] = 0;
            _hp[2] = 0;
            _filt[1] = 0;
            _filt[2] = 0;

 

 

But as soon as period is over 40 I get a NaN


@ErikD

ErikD
27 Jul 2013, 11:54

I think I got it to work now

 


@ErikD

ErikD
07 Jul 2013, 20:14

Hmm, I had none of this problems


@ErikD

ErikD
14 Jun 2013, 09:51

RE:
ahmedmohamedou said:

Please, can you share the solution. I developed a cBot which gives this error: Error #31590622: can not create instance. 

I removed all my .algo file


@ErikD

ErikD
11 Jun 2013, 18:34

Thank you, the issue was resolved with the help of Spotwares support

And thank you for a swift reply and help on the issue!


@ErikD

ErikD
11 Jun 2013, 17:02 ( Updated at: 21 Dec 2023, 09:20 )

RE:
ErikD said:

For some unknown reson my cAlgo just wont start, everything was fine and then it wasent.

No updates or anything done in the application

 

I get an error message

#31590622

 

Anyone know what how I can solve it?

Heres the image

Heres the image


@ErikD