Multiple symbols

Created at 09 Feb 2013, 21:37
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!
FU

fullmonte

Joined 09.02.2013

Multiple symbols
09 Feb 2013, 21:37


I am going to look at this tonight. Want to trade of GBPUSD but also look at other currencies for correlation effects. I assume MarketSeries exposes the other currency pairs? Please confirm.


@fullmonte
Replies

hichem
11 Feb 2013, 09:21

RE:
fullmonte said:

I am going to look at this tonight. Want to trade of GBPUSD but also look at other currencies for correlation effects. I assume MarketSeries exposes the other currency pairs? Please confirm.

Actually that is not possible for the moment in cAlgo.

There is a 3rd-party framework that does that : http://scyware.com/

 

 

 

 


@hichem

admin
11 Feb 2013, 11:33

Hello,

Currently MarketSeries only exposes the symbol that the instance is attached to. Using multiple currency pairs in cAlgo is currently under development and will be available in the near future.

Regards.

 


@admin

fullmonte
11 Feb 2013, 15:35

RE:
admin said:

Hello,

Currently MarketSeries only exposes the symbol that the instance is attached to. Using multiple currency pairs in cAlgo is currently under development and will be available in the near future.

Regards.

 

I was thinking could you not make an indicator for each symbol and then just refer to each indicator for the currecy pair you need at a given moment as a work around.


@fullmonte

admin
14 Feb 2013, 09:55

No, because when you reference the indicator it will use the MarketSeries source that it is supplied from the referencing algorithm.


@admin

carlitodog
13 Apr 2013, 08:17

RE:
admin said:

No, because when you reference the indicator it will use the MarketSeries source that it is supplied from the referencing algorithm.

Is there a timeframe for development of this "multiple timeframe" and "multiple symbol" access? 


@carlitodog

cAlgo_Fanatic
15 Apr 2013, 11:47

We cannot provide an estimate for multi-timeframes at the moment.


@cAlgo_Fanatic

fullmonte
19 Apr 2013, 14:52

RE:
cAlgo_Fanatic said:

We cannot provide an estimate for multi-timeframes at the moment.

Lack of Multi symbols is one of the CAlgos 2 greatest weaknesses, the other being the lack of debug which makes system testing quite a PITA. Rather than having a "flash" implementation why not provide the symbols as least allow 2 different robots to talk to each other as a work around through an interface. That would allow robots to trade baskets with knowledge of the other traders positions and events.


@fullmonte

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: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