Multiple symbols
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.
Replies
fullmonte
11 Feb 2013, 15:35
RE:
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
carlitodog
13 Apr 2013, 08:17
RE:
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:
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
cAlgo_Fanatic
17 Sep 2013, 11:59
Please see: Multi-symbol robots and indicators & Multi-timeframe robots/indicators
@cAlgo_Fanatic
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
hichem
11 Feb 2013, 09:21
RE:
Actually that is not possible for the moment in cAlgo.
There is a 3rd-party framework that does that : http://scyware.com/
@hichem