Replies

Neob1y
28 May 2015, 20:18

RE:

mazvis said:

Hello, I am new with this platform so I am sorry if the question may sound silly. I downloaded, installed, watched the video but cannot start the backtest. Whatever bot I select, the backtest button is disabled. Does it mean that backtesting is disabled in weekends, or what do I do wrong?

Hi, baktest it works only with the connected terminal to the Internet and logged on account.


@Neob1y

Neob1y
22 Nov 2014, 18:08

Hello, how to open a window for creating Limit order (F9) from cBots or Indicators? If possible, how to pass parameters in this window (symbol, price, volume, SL, TP, Comment)? 


@Neob1y

Neob1y
17 Sep 2013, 17:39

RE:

cAlgo_Development said:

We are already working on it. Backtesting will be available very soon.

Thanks for the answer.


@Neob1y

Neob1y
17 Sep 2013, 16:58

RE:

Neob1y said:

Hi, at the moment is not true, but it can be circumvented:

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


namespace cAlgo.Indicators
{
    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC)]
    public class S1 : Indicator
    {
        [Parameter(DefaultValue = 0.0)]
        public double Parameter { get; set; }
        string fileName = "";
        string[] Pr = new string[1];

        [Output("Main")]
        public IndicatorDataSeries Result { get; set; }


        protected override void Initialize()
        {
            if (Symbol.Code.ToString() == "EURUSD")
            {
                fileName = "C:\\Users\\***\\Documents\\cAlgo\\Sources\\Indicators\\Pary\\EURUSD.txt";
            }
            if (Symbol.Code.ToString() == "EURGBP")
            {
                fileName = "C:\\Users\\***\\Documents\\cAlgo\\Sources\\Indicators\\Pary\\EURGBP.txt";
            }
        }

        public override void Calculate(int index)
        {
            using (StreamWriter sw = new StreamWriter(new FileStream(fileName, FileMode.Create, FileAccess.Write)))
            {
                sw.WriteLine(MarketSeries.Close[MarketSeries.Close.Count - 1].ToString());
                sw.WriteLine(MarketSeries.Close[MarketSeries.Close.Count - 2].ToString());
                sw.WriteLine(MarketSeries.Close[MarketSeries.Close.Count - 3].ToString());
                sw.WriteLine(MarketSeries.Close[MarketSeries.Close.Count - 4].ToString());
                sw.WriteLine(MarketSeries.Close[MarketSeries.Close.Count - 5].ToString());
                sw.WriteLine(MarketSeries.Close[MarketSeries.Close.Count - 6].ToString());
            }

            Pr = File.ReadAllLines(fileName);

            Print(Pr[0]);

        }
    }
}

Drawback to this option, you need to add an indicator on each pair, which is needed. Also make a second indicator, which will handle the data.

 


@Neob1y

Neob1y
17 Sep 2013, 16:55

Hi, at the moment is not true, but it can be circumvented:

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


namespace cAlgo.Indicators
{
    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC)]
    public class S1 : Indicator
    {
        [Parameter(DefaultValue = 0.0)]
        public double Parameter { get; set; }
        string fileName = "";
        string[] Pr = new string[1];

        [Output("Main")]
        public IndicatorDataSeries Result { get; set; }


        protected override void Initialize()
        {
            if (Symbol.Code.ToString() == "EURUSD")
            {
                fileName = "C:\\Users\\***\\Documents\\cAlgo\\Sources\\Indicators\\Pary\\EURUSD.txt";
            }
            if (Symbol.Code.ToString() == "EURGBP")
            {
                fileName = "C:\\Users\\***\\Documents\\cAlgo\\Sources\\Indicators\\Pary\\EURGBP.txt";
            }
        }

        public override void Calculate(int index)
        {
            using (StreamWriter sw = new StreamWriter(new FileStream(fileName, FileMode.Create, FileAccess.Write)))
            {
                sw.WriteLine(MarketSeries.Close[MarketSeries.Close.Count - 1].ToString());
                sw.WriteLine(MarketSeries.Close[MarketSeries.Close.Count - 2].ToString());
                sw.WriteLine(MarketSeries.Close[MarketSeries.Close.Count - 3].ToString());
                sw.WriteLine(MarketSeries.Close[MarketSeries.Close.Count - 4].ToString());
                sw.WriteLine(MarketSeries.Close[MarketSeries.Close.Count - 5].ToString());
                sw.WriteLine(MarketSeries.Close[MarketSeries.Close.Count - 6].ToString());
            }

            Pr = File.ReadAllLines(fileName);

            Print(Pr[0]);

        }
    }
}

 


@Neob1y

Neob1y
17 Sep 2013, 16:37

Hi,

when do support Multi-timeframe baktesting?

Thanks.


@Neob1y