Topics
03 Feb 2016, 23:21
 5604
 17
19 Nov 2015, 09:18
 3463
 2
16 Jul 2015, 23:25
 2665
 4
26 Feb 2015, 21:20
 3302
 3
11 Sep 2014, 22:30
 0
 3257
 2
30 Aug 2014, 16:51
 2241
 1
22 Aug 2014, 18:05
 7547
 31
20 Aug 2014, 12:30
 3349
 3
14 Jul 2014, 12:48
 3154
 7
16 Jun 2014, 00:39
 2701
 2
22 May 2014, 16:17
 4377
 10
29 Mar 2014, 15:41
 3847
 4
27 Jan 2014, 08:20
 3649
 6
09 Jan 2014, 00:35
 5126
 15
22 Nov 2013, 00:51
 3519
 6
Replies

rkokerti
22 Oct 2013, 14:06

Very welcome... and thanks for quick response! I'm waiting for the fix, because it's necessary for the Currency-Index calculation.


@rkokerti

rkokerti
08 Oct 2013, 23:56

Sorry to hear that! :( 

But, thanks for the reply...


@rkokerti

rkokerti
10 Jun 2013, 16:41

Can you share with us the test result for USD/JYP and NZD/USD? 

Thanks!


@rkokerti

rkokerti
29 May 2013, 22:11

Dear Developer,

Just one short question. 

You sad: "daily bars will start from 00:00 UTC"

Am I understand that well, if I would like to open a position when a daily bar open, than I have to stay awake until 2am (CEST) or 1am (CET)???

Thanks,


@rkokerti

rkokerti
06 May 2013, 20:38

Dear Traderfx,

Thanks for your response, but unfortunately some brokers (e.g FxPro) has 10k as minimum trading volume, and some of them allows the 1k, 2k, 5k, etc...


@rkokerti

rkokerti
05 May 2013, 10:47

Thanks Guys!


@rkokerti

rkokerti
26 Apr 2013, 13:07 ( Updated at: 21 Dec 2023, 09:20 )

Hi Kricka,

Maybe this help you to close the % of open positions...

For example:

1, You have a position (100k)

 2, double click to position on chart

3, select the value you need to close (20k)

4, click on red button.... you will have 80k open position

See screenshot below:


@rkokerti

rkokerti
26 Apr 2013, 12:43

Yes, my "dream" has come true... /forum/suggestions/80

Excellent job Developers!!! Thanks so much.

I think cAlgo will the market leader... ;)


@rkokerti

rkokerti
14 Apr 2013, 15:56 ( Updated at: 21 Dec 2023, 09:20 )

Hello Admin!

I asked the same on the 11th Nov 2012! Half a year ago! See here: /forum/calgo-support/129 

My new test results below:

Please investigate it!

Thanks


@rkokerti

rkokerti
10 Apr 2013, 18:24

Hi PCWalker!

I wrote a code that export Backtest data to Excel.

You can find it here: /algos/robots/show/201

I know it is not an add-in, but maybe helps you.

 


@rkokerti

rkokerti
21 Feb 2013, 17:55

Hello,

Sorry, but cAlgo has the same problem!

As I mentioned above the displayed values of indicator are "NaN" on charts. Please investigate it.

Thanks


@rkokerti

rkokerti
21 Feb 2013, 12:04

Hello, 

I use another Indicators, but I have the same problem. I have to reload all indicators when I restart cAlgo, because the displayed values NaN. The reloading solved the problem, but please investigate it because it's very uncomfortable.

Thanks in advance!

 


@rkokerti

rkokerti
09 Feb 2013, 13:28

Hi,

You need to press space button several times between "    ", or press tab button once in this row : string Dist = "    " + Math.Round((sma1.Result[index] - sma2.Result[index]) / Symbol.PipSize,0); 

I hope it helps.


@rkokerti

rkokerti
08 Feb 2013, 12:09

RE: RE: spread indicator
Scott said:
MaXeY said:

Hello

anyone have spread indicator for Ctrader ?

I use this one at the momment it almost in sink with the actual spread Tick Chart /algos/show/207 

or you could use Lables for Charts /algos/show/195  just remove the infomation you dont want and set the indicator to false so that its not on your chart and in your way, I triying to work out how to calculate the pip differance between moving averages that will be printed using Lables.  But I can think of a few good thing that could also be added such as RSI.

 

Hi Scott, 

Try this...

 

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

namespace cAlgo.Indicators
{
        [Indicator(IsOverlay = true)]
        public class _RI_WriteToChart_v2 : Indicator
        {
//-----------------------------------------------------------------
    [Parameter]
      public DataSeries Source { get; set; }

    [Parameter(DefaultValue = 14)]
      public int PeriodMA1 { get; set; }
      
    [Parameter(DefaultValue = 7)]
      public int PeriodMA2 { get; set; }      
//-----------------------------------------------------------------        
        private Position position;
    private SimpleMovingAverage sma1;
    private SimpleMovingAverage sma2;
    private double Dist;    
//-----------------------------------------------------------------
        protected override void Initialize()
        {
        sma1 = Indicators.SimpleMovingAverage(Source,PeriodMA1);
        sma2 = Indicators.SimpleMovingAverage(Source,PeriodMA2);        
        }
//-----------------------------------------------------------------     
    
        public override void Calculate(int index)
        {

    string Dist = "    " + Math.Round((sma1.Result[index] - sma2.Result[index]) / Symbol.PipSize,0);
    
    ChartObjects.DrawText("Labels", 
    "Dist:" + "\n"
    , StaticPosition.TopLeft, Colors.Yellow);

    ChartObjects.DrawText("Dist", Dist, StaticPosition.TopLeft, Colors.LightBlue);
    }
   } 
}


@rkokerti

rkokerti
03 Dec 2012, 15:29

I also experienced the same thing


@rkokerti

rkokerti
02 Dec 2012, 13:53 ( Updated at: 21 Dec 2023, 09:20 )

Hello, 

I revoke my previous comment, that everything is fine with backtest result!!!

I tested the robot what coded by you Admin, the name is: „Sample SAR Trailing Stop”. This code is default in cAlgo.

Code:

// -------------------------------------------------------------------------------------------------
//
//    This code is a cAlgo API sample.
//
//    This robot is intended to be used as a sample and does not guarantee any particular outcome or
//    profit of any kind. Use it at your own risk
//
//    All changes to this file will be lost on next application start.
//    If you are going to modify this file please make a copy using the "Duplicate" command.
//
//    The "Sample SAR Trailing Stop Robot" will create a market Buy order if the parabolic SAR of the previous bar is 
//    below the candlestick. A Sell order will be created if the parabolic SAR of the previous bar is above the candlestick.  
//    The order's volume is specified in the "Volume" parameter. The order will have a trailing stop defined by the 
//    previous periods' Parabolic SAR levels. The user can change the Parabolic SAR settings by adjusting the "MinAF" 
//    and "MaxAF" parameters.
//
// -------------------------------------------------------------------------------------------------


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

namespace cAlgo.Robots
{
    [Robot]
    public class SampleSARTrailingStop : Robot
    {
        [Parameter("Min AF", DefaultValue = 0.02, MinValue = 0)]
        public double MinAF { get; set; }

        [Parameter("Max AF", DefaultValue = 0.2, MinValue = 0)]
        public double MaxAF { get; set; }

        [Parameter("Volume", DefaultValue = 10000, MinValue = 0)]
        public int Volume { get; set; }

        private Position position;
        private ParabolicSAR parabolicSAR;

        protected override void OnStart()
        {
            parabolicSAR = Indicators.ParabolicSAR(MinAF, MaxAF);
        }

        protected override void OnTick()
        {
            if (position == null && !Trade.IsExecuting)
            {
                var command = parabolicSAR.Result.LastValue < Symbol.Bid ? TradeType.Buy : TradeType.Sell;
                Trade.CreateMarketOrder(command, Symbol, Volume);

                Print("TradeCommand is {0}, Parabolic SAR is {1}, Bid is {2}", command, parabolicSAR.Result.LastValue, Symbol.Bid);
            }

            if (position != null && !Trade.IsExecuting)
            {
                double newStopLoss = parabolicSAR.Result.LastValue;
                bool isProtected = position.StopLoss.HasValue;

                if (position.TradeType == TradeType.Buy && isProtected)
                {
                    if (newStopLoss > Symbol.Bid) return;
                    if (newStopLoss - position.StopLoss < Symbol.PointSize) return;
                }

                if (position.TradeType == TradeType.Sell && isProtected)
                {
                    if (newStopLoss < Symbol.Bid) return;
                    if (position.StopLoss - newStopLoss < Symbol.PointSize) return;
                }

                Trade.ModifyPosition(position, newStopLoss, null);
            }
        }

        protected override void OnPositionOpened(Position openedPosition)
        {
            position = openedPosition;
        }

        protected override void OnPositionClosed(Position position)
        {
            Stop();
        }
    }
}

If you add for example EUR/USD instance to robot, and run a test you will see the result is INCORRECT again!!! Where these S/L values are coming???

Add the indicator PSAR to chart (settings: MinAF:0.02, MaxAF:0.2) and compare the indicator value with test result values. DO NOT MACH!

 

This statement is also true for other robots that use indicator value as stoploss!!!

If build a strategy to a backtest result, so many trader will be disappointed!!!  

Please investigate it thoroughly, and fix it as soon as possible, because we waited for weeks for a well-functioning backtest!!!! 

 

Thanks


@rkokerti

rkokerti
01 Dec 2012, 11:18

Hello, 

I thing the profit is very nice, but not all.

Your DrawDown is almost 90%!!! It is huge... Why are you earn money if then you lose it all? My opinion is that 10-20% of DrawDown is the maximum which guarantees the continuous earning, and well-balanced trading. It is only my point of view, but be careful with 90% DD.

Good luck!


@rkokerti

rkokerti
30 Nov 2012, 17:16

Thanks for the correction. Now it looks good!

Thanks again!


@rkokerti

rkokerti
30 Nov 2012, 17:01

Hello, 

Have you got any information about this issue? There are still Saturday's opened position. This distorts the backtest results.

Thanks!


@rkokerti

rkokerti
30 Nov 2012, 16:51

Thanks for your support, backtest function works well again!


@rkokerti