Tick timeframes not part of TimeFrame Class
Created at 04 Jul 2020, 20:14
Tick timeframes not part of TimeFrame Class
04 Jul 2020, 20:14
Hi,
I am trying to specify tick timeframes in a cbot, however it looks like the TimeFrame Class has not been updated to include Ticks.
In order to change tick timeframes in code I need to set parameters manually and use a reference to those parameters.
Am I missing something?
When I try to set the chart timeframe to Tick10 it defaults to Hour as well but can set it manually in the parameters.
[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class NewcBot11 : Robot
{
[Parameter("Timeframe0", DefaultValue = "Tick10")]
public TimeFrame tf0 { get; set; }
[Parameter("Timeframe1", DefaultValue = "Minute")]
public TimeFrame tf1 { get; set; }
TimeFrame[] Frames = new TimeFrame[2];
protected override void OnStart()
{
Frames[0] = tf0;
Frames[1] = tf1;
Print(Frames[0] + ", " + Frames[1]);
}
// Result: Hour, Minute
// Result after manually changing Timeframe0 to Tick10 through the dropdown in Parameter window: Tick10, Minute
PanagiotisCharalampous
06 Jul 2020, 09:16
Hi prosteel1,
You are not missing anything, this is the case at the moment. The missing members of the Timeframe class will be added in a future update of the API.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous