Topics
15 Sep 2019, 01:09
 1024
 2
17 Aug 2019, 21:25
 3
 1384
 2
27 Jun 2018, 20:41
 1458
 5
19 Jun 2018, 03:23
 1320
 2
15 Jun 2018, 22:51
 1397
 3
06 Mar 2018, 06:17
 1505
 2
01 Feb 2018, 16:54
 3023
 2
04 Oct 2017, 21:35
 2395
 4
Replies

leohermoso
21 Oct 2019, 22:22 ( Updated at: 22 Oct 2019, 08:45 )

GOING TO WRITE EVERYTHING WITH CAPS LOCK BECAUSE THIS IS VERY IMPORTANT!

 

STOP DOING STUPID UPDATES DURING TRADING HOURS! IS IT POSSIBLE? 


@leohermoso

leohermoso
20 Aug 2019, 14:59

RE:

afhacker said:

Yes, it's possible you can backtest a manual strategy on cTrader back tester with a cBot that allows you to execute and manage orders.

Take a look to our Manual strategy tester: https://www.algodeveloper.com/product/manual-strategy-tester/

 

That's a great piece of software! 


@leohermoso

leohermoso
17 Aug 2019, 21:09

using System;
using System.Linq;
using System.Collections.Generic;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;
using System.IO;
using System.Text;

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.ESouthAmericaStandardTime, AccessRights = AccessRights.FullAccess)]
    public class DataGet : Robot
    {



        string fname;
        List<string> mylist = new List<string>();

        protected override void OnStart()
        {

            fname = Symbol.Name + TimeFrame.ToString();
            string directory = string.Format("{0}{1}", Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "\\Data\\");

            if (!Directory.Exists(directory))
            {
                Directory.CreateDirectory(directory);
            }
            fname = string.Format("{0}{1}{2}", directory, fname, ".csv");



            for (int idx = MarketSeries.Close.Count; idx > 0; idx--)
            {
                if (double.IsNaN(MarketSeries.High.Last(idx)))
                    continue;
                mylist.Add(MarketSeries.OpenTime.Last(idx).ToString() + ";" + MarketSeries.OpenTime.Last(idx).DayOfWeek + ";" + MarketSeries.High.Last(idx).ToString().Replace(",", ".") + ";" + MarketSeries.Low.Last(idx).ToString().Replace(",", ".") + ";" + MarketSeries.Close.Last(idx).ToString().Replace(",", ".") + ";" + MarketSeries.Open.Last(idx).ToString().Replace(",", "."));

            }

            Stop();

        }




        protected override void OnStop()
        {
            File.WriteAllLines(fname, mylist, Encoding.UTF8);
        }
    }

}

I use this code the generate csv files... Then you can dump it to your mysql database! Just scroll the chart back for the time you want the data from, choose the time frame and hit the play button on the bot! It will save it under documents/data/SymbolNameTimeFrame.csv 


@leohermoso

leohermoso
14 Aug 2019, 21:37

RE:

Panagiotis Charalampous said:

Hi leoheermoso,

There isn't such a place. Usually known bugs are fixed in the next couple of versions. This is an exception since we are currently refactoring cTrader Automate and we will fix this as soon as we finish.

Best Regards,

Panagiotis

Hello Panagiotis,

 

Tks for your answer, I am looking forward to this fix! 


@leohermoso

leohermoso
13 Aug 2019, 19:25

Is there any place with the know bugs? If now it will be nice to have. I just spent 220 USD in an aws instance at amazon with optimization purposes and looks like the results are entirely wrong. Can you please enumerate know bugs? Tks 


@leohermoso

leohermoso
13 Aug 2019, 19:06

So backtest is correct? 


@leohermoso

leohermoso
13 Aug 2019, 17:23 ( Updated at: 21 Dec 2023, 09:21 )

BackTest 1Backtest 2Both are backtesting results

 

OPT 1OPT2

These both are optimization results.

 

 

I use daily data inside this 1-minute bot, and the parameter attached to daily data is 35 periods and its roughly the period that optimization and backtest begin to behave accordingly, so it makes me think to backtest are not correct pre-allocating the necessary data to correctly load the indicator


@leohermoso

leohermoso
13 Aug 2019, 17:06

RE:

Panagiotis Charalampous said:

Hi cysecsbin.01,

Thanks, we managed to reproduce this. The problem is with the optimization results. The backtesting results are correct. We will fix in in an upcoming update.

Best Regards,

Panagiotis

Hi, Is this problem solved? I am getting different results between opt and backtests. I think its caused by MarketData.GetSeries that MAYBE is not pre allocating the correct amount of data to initialize the indicators. 


@leohermoso

leohermoso
27 Feb 2019, 15:21

RE:

Panagiotis Charalampous said:

Hi leohermoso,

Swaps are not available via FIX API but they are available in Open API.

Best Regards,

Panagiotis

Tks for your answer. I made a request for accessing the OPEN API however my status is "Submitted"  Can you help me with that?


@leohermoso

leohermoso
26 Feb 2019, 22:10

RE:

Panagiotis Charalampous said:

Hi leohermoso,

Swaps are not available at the moment in cTrader Automate API.

Best Regards,

Panagiotis

Is it possible to retrieve it using fix protocol? 


@leohermoso

leohermoso
26 Feb 2019, 21:55

Ok tks! I am also developing an application to cointegration, as you can see here

 

https://leohermoso.shinyapps.io/cointegrationBeta/

 

I asked permission for connect api, but not answer until now. Can you please check? tks


@leohermoso

leohermoso
23 Feb 2019, 21:16

Any answer for this question?


@leohermoso

leohermoso
10 Sep 2018, 22:58

Got same error, and I am using a package download via nuget


@leohermoso

leohermoso
28 Jun 2018, 18:59

It’s live accounts 


@leohermoso

leohermoso
24 May 2018, 23:58

And when it is going to be released? 


@leohermoso

leohermoso
01 Feb 2018, 03:44

RE:

Spotware said:

Partial close is not supported in backtesting. We plan to support it in the future.

When this is going to happen?


@leohermoso

leohermoso
23 Jan 2018, 06:41

Include equity drawdown too!


@leohermoso

leohermoso
23 Jan 2018, 04:36

I discovered the problem, i have two rules for order cancelation:

 

 else if (Symbol.Ask > sellprice_)                      
                        {
                            cancel_orders_by_side(VR_label, TradeType.Sell, VR_label);

                        }

This is for Short pending orders, so whats happens is even with 1.2 ms latency with broker server, broker took 200-300ms to execute request to cancel, this is a infinite time in terms of HFT. So i am pulling pending order out and using market orders instead.

 

You could include an option to delay execution in backtest like quantconnect have, will make results closer to reality! 

 

ps: Drummond i am using tick data to backtest!

 

Best Regards

 

Leo Hermoso


@leohermoso

leohermoso
22 Jan 2018, 16:11

Of course are the same period! othewise this topic makes no sense! What i meant its because January drawdown( that i am still taking) i was able to realize the different results... The backtest was performed 01/11/2017 to 30/11/2017 same period the bot did run non-stop in a ultra low latency vps from forexvps.net. 


@leohermoso

leohermoso
20 Jan 2018, 23:31

This delays happens when canceling orders too?


@leohermoso