Enum CandleWidth
- Namespace
- WhalesSecret.TradeScriptLib.Entities.MarketData
- Assembly
- WhalesSecret.TradeScriptLib.dll
Candle width (aka candle interval) is a time period that is covered by a single candle.
public enum CandleWidth
- Extension Methods
Fields
Minute1 = 0
1 minute interval.
Minutes3 = 1
3 minutes interval.
Minutes5 = 2
5 minutes interval.
Minutes15 = 3
15 minutes interval.
Minutes30 = 4
30 minutes interval.
Hour1 = 5
1 hour interval.
Hours2 = 6
2 hours interval.
Hours4 = 7
4 hours interval.
Hours6 = 8
6 hours interval.
Hours8 = 9
8 hours interval.
Hours12 = 10
12 hours interval.
Day1 = 11
1 day interval.
Days3 = 12
3 days interval.
Week1 = 13
1 week interval.
Month1 = 14
1 month interval.
Other = 15
An unsupported value.
Exchanges can support more CandleWidth options than Whale's Secret supports. Any such value will be mapped to this value.
User is not supposed to use this value in her code.
Remarks
For all candle widths smaller than Day1, the first candle of the day starts at midnight and then every other such candle must start at the time of the day that is divisible by the interval the given candle width represents. For example, 1-minute candle may start at 00:06:00 or 10:21:00, but not 05:07:30, 00:06:01, nor 00:06:00.001; 3-minute candle may start at 00:06:00 or 10:21:00, but not 00:07:00, 00:06:01, nor 00:06:00.001; 2-hour candle may start at 00:00:00, 02:00:00, or 14:00:00, but not 15:00:00, 04:03:00, nor 16:00:00.001 etc.
All candles with widths greater than or equal to 1-day always start at midnight.
3-day candles may only start on midnight of days with difference from UnixEpoch (i.e. 1970-01-01) being divisible by 3. For example, 1970-01-04 00:00:00 (midnight of 4th January 1970) is thus a valid start time of a 3-day candle, but 1970-01-05 00:00:00 is not.
1-week candles always start on Monday.
1-month candles always start on the 1st day of a month.