Tick TimeFrames can't be selected from parameters window since 4.2
Tick TimeFrames can't be selected from parameters window since 4.2
19 Apr 2022, 14:48
Hi since 4.2 I can no longer select Tick Timeframes from the Parameter window - only Minutes, Hours etc are selectable.
Interestingly the hard coded default Tick Timeframes are still used as the screenshot shows when I run code from my previous post:
The previous issue was fixed and worked great until 4.2 stopped allowing the selection of Tick Timeframes from the Parameters window.
It seems that the Timeframe Class still contains the Tick timeframes, but they are not selectable from the Parameters window as shown in this screenshot:
This code example shows the behaviour while printing the.LowPrices to show that the Tick Timeframes are infact still being used in the program but just not selectable from the Parameters window:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cAlgo.API;
using cAlgo.API.Collections;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
namespace NewcBot3
{
[Robot(AccessRights = AccessRights.None)]
public class NewcBot3 : Robot
{
[Parameter("Timeframe0", DefaultValue = "Tick10")]
public TimeFrame tf0 { get; set; }
[Parameter("Timeframe1", DefaultValue = "Minute")]
public TimeFrame tf1 { get; set; }
TimeFrame[] Frames = new TimeFrame[2];
Bars[] series = new Bars[2];
protected override void OnStart()
{
// Tick TimeFrames are no longer selectable in Parameters window
Frames[0] = tf0;
series[0] = MarketData.GetBars(Frames[0]);
Frames[1] = tf1;
series[1] = MarketData.GetBars(Frames[1]);
}
protected override void OnTick()
{
// Handle price updates here
Print("TimeFrame " + Frames[0] + " LowPrices = " + series[0].LowPrices[(series[0].Count - 2)]);
Print("TimeFrame " + Frames[1] + " LowPrices = " + series[1].LowPrices[(series[1].Count - 2)]);
}
protected override void OnStop()
{
// Handle cBot stop here
}
}
}
And congratulations to Spotware for their Awesome Hard work bringing out 4.2 with .Net 6 Yay!
amusleh
20 Apr 2022, 09:41
Hi,
We are aware of this issue, it will be fixed on a future release.
@amusleh