Topics
21 Aug 2015, 11:56
 3148
 3
24 Jul 2015, 07:51
 1
 921
 3
29 May 2015, 17:10
 2649
 2
03 Apr 2015, 22:03
 2534
 4
26 Mar 2015, 19:03
 4376
 4
Replies

JeremyG
18 Dec 2015, 17:00

RE: RE:

Hi Spotware,

It's December 2015 and we're still waiting for Renko bars.

As has been mentioned many times round here, this is a major drawback for cTrader..

Any updates?

Thanks

Jeremy


@JeremyG

JeremyG
17 Dec 2015, 08:47

Lack of Renko certainly keeps me with MT4 for the time being. Would be amazing to have them in cTrader/cAlgo!


@JeremyG

JeremyG
30 Oct 2015, 21:18

RE:

I'm not asking for the source code, I just want to know what price it's using, i.e. open,close, weighted close etc?

This shouldn't be a secret, I'm just wondering how to interpret the results, especially as I don't see it correlating with any other setup I have seen in other platforms.

 

Spotware said:

Dear Trader,

We do not provide source code of our standard indicators.

Many users upload their Indicators/cBots in cTDN. You can try to find a CCI Indicator that suits your needs in Indicators library. If you cannot find it there you can also contact one of our Partners for further help or post a job in Development Jobs section. You could also try to create your own CCI indicator.

 


@JeremyG

JeremyG
24 Jul 2015, 11:07

Just to note: If you are fully zoomed in and vertically expanded with no volume bars the numbers do match up, but not at any other zoom level, or without volume bars.


@JeremyG

JeremyG
24 Jul 2015, 08:08

Just to note: If you are fully zoomed in and vertically expanded with no volume bars the numbers do match up, but not at any other zoom level, or without volume bars.


@JeremyG

JeremyG
09 Jul 2015, 12:58

These tutorials helped me a lot:

https://www.youtube.com/watch?v=SXmVym6L8dw&list=PLAC325451207E3105


@JeremyG

JeremyG
30 Jun 2015, 10:56

I find the optimization freezes after one or two runs (not passes) and I usually restart cAlgo to get it working again.

I will try the build button next time and see if it's the same issue.


@JeremyG

JeremyG
27 Jun 2015, 18:41

RE: RE:

I meant to say your positions won't CLOSE if RSI passes over 50 but was never exactly 50.

JeremyG said:

A couple tips:

When using IF statements etc, you gotta use two equals signs when comparing two numbers, eg:

if (rsi.Result.LastValue == 50)

Another problem is that your position's won't work if RSI passes over 50 but was never exactly 50.

 

DontAlgoMe said:

So I have no knowledge of coding and Im just trying to figure it out based on the sample bots.

I want a bot that opens a buy position when rsi < 15 and open a sell position when rsi > 85. I want to have a 10 pip stop on my positions, and I want the positions to close when RSI reverts to 50.

 

This is what I ended up with tampering with the code... I dont think its working because adjusting values doesnt change my backtesting results. So Im pretty sure I butchered the language.

 

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

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class Customizedrsibot : Robot
    {
        [Parameter("Source")]
        public DataSeries Source { get; set; }

        [Parameter("Periods", DefaultValue = 14)]
        public int Periods { get; set; }

        [Parameter("Volume", DefaultValue = 10000, MinValue = 1000)]
        public int Volume { get; set; }
        
        [Parameter("Inital Stop Loss (pips)", DefaultValue = 10.0)]
        public int init_StopLoss { get; set; }

        private RelativeStrengthIndex rsi;

        protected override void OnStart()
        {
            rsi = Indicators.RelativeStrengthIndex(Source, Periods);
        }

        protected override void OnTick()
        {
            if (rsi.Result.LastValue = 50)
            {
                Close(TradeType.Sell);
               
            if (rsi.Result.LastValue < 15)
            {
               Open(TradeType.Buy,PlaceStopOrder)            
            }
            else if (rsi.Result.LastValue = 50)
            {
                Close(TradeType.Buy);
               
            if (rsi.Result.LastValue > 85)
            {Open(TradeType.Sell,PlaceStopOrder)
            
           }
            
        

        private void Close(TradeType tradeType)
        {
            foreach (var position in Positions.FindAll("SampleRSI", Symbol, tradeType))
                ClosePosition(position);

 

 


@JeremyG

JeremyG
27 Jun 2015, 18:38

RE:

A couple tips:

When using IF statements etc, you gotta use two equals signs when comparing two numbers, eg:

if (rsi.Result.LastValue == 50)

Another problem is that your position's won't work if RSI passes over 50 but was never exactly 50.

 

DontAlgoMe said:

So I have no knowledge of coding and Im just trying to figure it out based on the sample bots.

I want a bot that opens a buy position when rsi < 15 and open a sell position when rsi > 85. I want to have a 10 pip stop on my positions, and I want the positions to close when RSI reverts to 50.

 

This is what I ended up with tampering with the code... I dont think its working because adjusting values doesnt change my backtesting results. So Im pretty sure I butchered the language.

 

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

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class Customizedrsibot : Robot
    {
        [Parameter("Source")]
        public DataSeries Source { get; set; }

        [Parameter("Periods", DefaultValue = 14)]
        public int Periods { get; set; }

        [Parameter("Volume", DefaultValue = 10000, MinValue = 1000)]
        public int Volume { get; set; }
        
        [Parameter("Inital Stop Loss (pips)", DefaultValue = 10.0)]
        public int init_StopLoss { get; set; }

        private RelativeStrengthIndex rsi;

        protected override void OnStart()
        {
            rsi = Indicators.RelativeStrengthIndex(Source, Periods);
        }

        protected override void OnTick()
        {
            if (rsi.Result.LastValue = 50)
            {
                Close(TradeType.Sell);
               
            if (rsi.Result.LastValue < 15)
            {
               Open(TradeType.Buy,PlaceStopOrder)            
            }
            else if (rsi.Result.LastValue = 50)
            {
                Close(TradeType.Buy);
               
            if (rsi.Result.LastValue > 85)
            {Open(TradeType.Sell,PlaceStopOrder)
            
           }
            
        

        private void Close(TradeType tradeType)
        {
            foreach (var position in Positions.FindAll("SampleRSI", Symbol, tradeType))
                ClosePosition(position);

 


@JeremyG

JeremyG
27 Jun 2015, 18:33

RE: RE:

Hey, you're really gonna have to devote time to learning the basics of c# and cAlgo (the language and the program) and do a lot of testing and tweaking of your strategy.

Watch youtube videos, read the microsoft help files, read through this forum, keep breaking and fixing the reference cBots. Start with very simple building blocs and add complexity from there.

Not to discourage you in any way, but I can absolutely promise you that your current strategy won't work without a fair amount of tweaking and you'll need to know how to tweak it to get it to where you want it.

Keep going, I was an absolute beginner not even two months ago and now I can code my own robots. It takes time but knowing how to code your strategies yourself is invaluable.

Sorry I can't help more specifically with the code you posted..

 

DontAlgoMe said:

I would also like to be able to set profit targets based on pips that close the position rather than the rsi value, to see which works better.

 

 


@JeremyG

JeremyG
09 Jun 2015, 14:07

I'm also wondering about this.

Spotware, are you there??


@JeremyG

JeremyG
09 Jun 2015, 13:42

Yeh, I don't any support posts recently.

Spotware, care to explain?


@JeremyG

JeremyG
29 May 2015, 12:45

Some data types seem to support it and other not, eg these work, I don't know what else does:

 

        [Parameter("Source")]
        public DataSeries Source { get; set; }
        [Parameter("Bollinger Bands MA Type")]
        public MovingAverageType MAType { get; set; }

 


@JeremyG

JeremyG
28 May 2015, 18:24

Still can't import tick data, so many instruments limited to < year backtesting.


@JeremyG

JeremyG
27 May 2015, 05:29

Did you try using Open.LastValue instead of Open.Last(0) etc?


@JeremyG

JeremyG
13 May 2015, 16:03

Update:

The issue seems to be that the daily chart is shifted back by 1 day, so it does not correlate with the minute/hourly charts.

Does anyone know about this issue?

Thanks!


@JeremyG

JeremyG
13 May 2015, 15:07

I'll just add, when I look at minute/hourly charts, it does show the current hour/minute/day..

 

 


@JeremyG

JeremyG
05 Apr 2015, 22:12

Ok I got it now.. The 'If' is calling the method created below it..


@JeremyG

JeremyG
05 Apr 2015, 21:07

But you have methods like OnTick() etc, they are 'built in' - So in this case is Open() just a name/holder for the 'TradeType.buy' function?

Thanks!


@JeremyG

JeremyG
27 Mar 2015, 13:36

Hey kricka, you might be right that XP is nearing the end of its life, but it's is still included as supported in the system requirements. I haven't had any issue with any other software whatsoever.


@JeremyG