Who can code this please? Thank you

Created at 11 Nov 2013, 03:18
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
ctrader44443123's avatar

ctrader44443123

Joined 11.11.2013

Who can code this please? Thank you
11 Nov 2013, 03:18


DELETED


@ctrader44443123
Replies

ctrader44443123
11 Nov 2013, 03:20

RE:

DELETED


@ctrader44443123

Cerunnos
11 Nov 2013, 10:11

With the following basic structure of COG you should be able to complete your Robot:

 

 

// Center of Gravity by Belkhayate -----------------------------

[Parameter(DefaultValue = 3.0, MinValue = 1, MaxValue = 4)]
public int degree { get; set; }

[Parameter(DefaultValue = 120)]
public int period { get; set; }

[Parameter(DefaultValue = 1.4)]
public double strdDev { get; set; }

[Parameter(DefaultValue = 2.4)]
public double strdDev2 { get; set; }

[Parameter(DefaultValue = 3.4)]
public double strdDev3 { get; set; }
  //--------------------------------------------------------------
private double main;
private double red_1;
private double red_2;
private double red_3;
private double blue_1;
private double blue_2;
private double blue_3;
private BelkhayatePRC BEL;

protected override void OnStart()
        {         
            BEL = Indicators.GetIndicator<BelkhayatePRC>(degree, period, strdDev, strdDev2, strdDev3);       
        }

protected override void OnTick()
        {

            // COG main line
            main = BEL.prc[Index];
            // COG lines
            red_1 = BEL.sqh[Index];
            red_2 = BEL.sqh2[Index];
            red_3 = BEL.sqh3[Index];

            blue_1 = BEL.sql[Index];
            blue_2 = BEL.sql2[Index];
            blue_3 = BEL.sql3[Index];

            //your buy-condition...
            if (MarketSeries.Close[Index] > red_2)...

       }
 

 


@Cerunnos

ctrader44443123
11 Nov 2013, 13:24

RE:

DELETED


@ctrader44443123

ctrader44443123
11 Nov 2013, 13:47

DELETED


@ctrader44443123

Cerunnos
11 Nov 2013, 14:22

RE:

lagfaifi said:

But the code you do to me give me this error

 

however the BelkhayatePRC is in the indicator folder ...

thank you !!

Maybe the reference is missing in the first line:
//#reference: ..\Indicators\BelkhayatePRC.algo


@Cerunnos

Cerunnos
11 Nov 2013, 14:37

In this forum you will find all the basics in order to program a robot. All you need is some knowledge of C#. Otherwise you can someone pay to code your strategy...


@Cerunnos

ctrader44443123
11 Nov 2013, 19:09

RE:

DELETED


@ctrader44443123

Cerunnos
11 Nov 2013, 20:05

Add following code:

protected int Index 
        {
            get { return MarketSeries.Close.Count - 1; }
        }

 

For learning you should view the sample robots in the left column of cAlgo. And with <Search> you find a solution to almost any problem :-)
I can code your strategy, but then you have to pay for work.


@Cerunnos

ctrader44443123
11 Nov 2013, 20:20

RE:

DELETED


@ctrader44443123