Topics
Replies
lec0456
05 Jun 2013, 12:00
RE:
One thing to point out that what you are proposing is using UTC time but aggregating based on New York time. So that would be UTC +4 in the summer and UTC +5 in the winter or 21:00 UTC or 22:00 UTC. C# takes care of the the conversions and changes on specific dates using the TimeZone functionality.
I mention that because if people decide to program robots based on say 21:00UTC being the start of the day they will be off in the winter. They would need to convert to NY time first and use 17:00 to be consistent year round
which is fine, as long as people know
@lec0456
lec0456
05 Jun 2013, 11:59
One thing to point out that what you are proposing is using UTC time but aggregating based on New York time. So that would be UTC +4 in the summer and UTC +5 in the winter or 21:00 UTC or 22:00 UTC. C# takes care of the the conversions and changes on specific dates using the TimeZone functionality.
I mention that because if people decide to program robots based on say 21:00UTC being the start of the day they will be off in the winter. They would need to convert to NY time first and use 17:00 to be consistent year round
@lec0456
lec0456
29 May 2013, 09:59
Ok, so currently the aggregation periods are set at each individual broker baased on thier time zone setting? Thats the way it seems, because for exapmle FXpro agregates daily data correctly but IC markets has that extra day.
I hope that daily data will be aggregated the same across all brokers, it would appear to me that the only way to do that is to aggregate based on Cyprus time
@lec0456
lec0456
29 May 2013, 00:00
Look at the period separators going from friday to monday on this chart:
http://icmarkets.ctrader.com/c/4rW5n (the week goes from 5th to the 7th to the 8th)
With brokers using UTC it considers monday's trading hours as sunday and therefore creates a period(and a candle). This error does not happen with brokers using Cyprus time.
http://fxpro.ctrader.com/c/YrW5n (the week goes from the 5th straight to the 8th) like it should
@lec0456
lec0456
28 May 2013, 23:31
Are you making a Big Mistake?
I am very concerned by what you are doing!!! Do you realize that if you move to UTC time instead of the week starting on monday it will start on Sunday @21:00 then create a new day in 2 hours. So it will look like there is 6 trading days instead of 5! This screws up volume and Daily candles because you get one day at the start of the week that is bogus.
Just check one of your brokers using UTC time right now
http://icmarkets.ctrader.com/c/urW5n
Look at the tick volume for a daily chart. It shows one day with no volume and 5 normal days. This completely messes up technical analysis on your platform.
@lec0456
lec0456
25 May 2013, 08:03
meant like this:
var SellPairStopOrder = new StopOrderRequest(TradeType.Sell, TradeVol, PiviotPrice) {Label="SellPairOrder", StopLoss=PiviotPrice+(orderTradeSL*Symbol.PipSize), TakeProfit=PiviotPrice-(orderTradeTP*Symbol.PipSize)+Symbol.Spread, Expiration = pendingOrderExp}; Trade.Send(SellPairStopOrder);
when you create the trade you have a color parameter and set it.
var SellPairStopOrder = new StopOrderRequest(TradeType.Sell, TradeVol, PiviotPrice) {Label="SellPairOrder", StopLoss=PiviotPrice+(orderTradeSL*Symbol.PipSize), TakeProfit=PiviotPrice-(orderTradeTP*Symbol.PipSize)+Symbol.Spread, Expiration = pendingOrderExp, Color=Color.Red}; Trade.Send(SellPairStopOrder);
thought it might be cool when having trades executed by different robots or different criteria within a robot, you can easily identifiy a trade.
@lec0456
lec0456
24 May 2013, 06:18
I am really glad you asked this question and that it was answered in the way it was. I followed the link and read a very important requirement for the price channel.
It said, "The Price Channel formula does not include the most recent period. Price Channels are based on prices prior to the current period. A 20-day Price Channel for October 21 would be based on the 20-day high and 20-day low ending the day before, October 20. A channel break would not be possible if the most recent period was used."
I had created a price channel indicator like the one posted by "adaled". it used the maximun and minimum fuctions. But this is incorrect because they use the current period in there calculations. Actually, there is a sample indicator included with the installation of cAlgo called Sample Price Channels, it calculates the channel correctly like described on the Stock Charts.Com website:
using System; using cAlgo.API; using cAlgo.API.Indicators; using cAlgo.API.Internals; namespace cAlgo.Indicators { [Indicator(IsOverlay = true)] public class SamplePriceChannels : Indicator { [Parameter(DefaultValue = 20)] public int Periods { get; set; } [Output("Upper", Color = Colors.Pink)] public IndicatorDataSeries Upper { get; set; } [Output("Lower", Color = Colors.Pink)] public IndicatorDataSeries Lower { get; set; } [Output("Center", Color = Colors.Pink)] public IndicatorDataSeries Center { get; set; } public override void Calculate(int index) { double upper = double.MinValue; double lower = double.MaxValue; for (int i = index - Periods; i <= index - 1; i++) { upper = Math.Max(MarketSeries.High[i], upper); lower = Math.Min(MarketSeries.Low[i], lower); } Upper[index] = upper; Lower[index] = lower; Center[index] = (upper + lower) / 2; } } }
@lec0456
lec0456
21 May 2013, 02:46
( Updated at: 11 Mar 2016, 14:16 )
I noticied an issue that should be investigated. While backtesting testing a robot, I made changes to a custom indicator used in the robot. The backtest results did not refledt the changes but seemed to use cached data. Once I changed the dates of the backtest then the new results were displayed. Please verifiy this behavior
@lec0456
lec0456
06 Jun 2013, 14:07
OK, so I could see why the code is crashing based on this:
http://msdn.microsoft.com/en-us/library/bb382770.aspx
However, So now it would seem that since June 6th at 6:50 for EUR/USD OpenTime.Kind is set to UTC instead of unspecified.
My question is, lets say for a broker that was using Cyprus Time like FXpro, for the times where the DateTimeKind is "unspecified" is it using Cyprus time or UTC.
To rephrase the question, are the times shown before the change to UTC using Cypus Time and the times shown after using UTC?
@lec0456