Data feed in initial indicator calculate from other timeframes
Data feed in initial indicator calculate from other timeframes
28 Apr 2020, 13:40
Hello Spotware Team,
i have found a behaviour, that makes using an indicator with other timeframes nearly useless, because of the data feed the other timeframe gets.
Sadly i have noticed that by chance just now and i am working with cTrader since 3 1/2 years now, so i wasted a lot of time not knowing that all the data i analysed in this time was useless.
Please see the following differences:
1. In a test-bot:
using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;
namespace cAlgo.Robots
{
[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class Test_Bot : Robot
{
Bars tf_X;
protected override void OnStart()
{
// Put your initialization logic here
tf_X = MarketData.GetBars(TimeFrame.Daily);
}
protected override void OnTick()
{
// Put your core logic here
int index = Bars.OpenPrices.Count - 1;
DateTime chart_OpenTime = Bars.OpenTimes[index];
int tf_X_Idx = tf_X.OpenTimes.GetIndexByTime(chart_OpenTime);
Print(string.Join(" ",
"Chart-Idx",
index,
"Chart-OpenTime",
chart_OpenTime,
"Tf-X-Idx",
tf_X_Idx,
"Tf-X-OpenTime",
tf_X.OpenTimes[tf_X_Idx],
"Tf-X-High",
tf_X.HighPrices[tf_X_Idx],
"Tf-X-Low",
tf_X.LowPrices[tf_X_Idx]));
}
protected override void OnStop()
{
// Put your deinitialization logic here
}
}
}
2. In a test-indicator (the code is like the one from the bot):
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
namespace cAlgo
{
[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class Test_Indi : Indicator
{
Bars tf_X;
protected override void Initialize()
{
// Initialize and create nested indicators
tf_X = MarketData.GetBars(TimeFrame.Daily);
}
public override void Calculate(int index)
{
// Calculate value at specified index
// Result[index] = ...
DateTime chart_OpenTime = Bars.OpenTimes[index];
int tf_X_Idx = tf_X.OpenTimes.GetIndexByTime(chart_OpenTime);
Print(string.Join(" ",
"Chart-Idx",
index,
"Chart-OpenTime",
chart_OpenTime,
"Tf-X-Idx",
tf_X_Idx,
"Tf-X-OpenTime",
tf_X.OpenTimes[tf_X_Idx],
"Tf-X-High",
tf_X.HighPrices[tf_X_Idx],
"Tf-X-Low",
tf_X.LowPrices[tf_X_Idx]));
}
}
}
1. Partial output from test-bot using chart h1 and data "h1 bars from Server (open prices)":
...
22/10/2019 20:00:00.000 | Chart-Idx 192 Chart-OpenTime 22.10.2019 20:00:00 Tf-X-Idx 76 Tf-X-OpenTime 21.10.2019 21:00:00 Tf-X-High 1,11567 Tf-X-Low 1,11177
22/10/2019 19:00:00.000 | Chart-Idx 191 Chart-OpenTime 22.10.2019 19:00:00 Tf-X-Idx 76 Tf-X-OpenTime 21.10.2019 21:00:00 Tf-X-High 1,11567 Tf-X-Low 1,11202
22/10/2019 18:00:00.000 | Chart-Idx 190 Chart-OpenTime 22.10.2019 18:00:00 Tf-X-Idx 76 Tf-X-OpenTime 21.10.2019 21:00:00 Tf-X-High 1,11567 Tf-X-Low 1,11229
22/10/2019 17:00:00.000 | Chart-Idx 189 Chart-OpenTime 22.10.2019 17:00:00 Tf-X-Idx 76 Tf-X-OpenTime 21.10.2019 21:00:00 Tf-X-High 1,11567 Tf-X-Low 1,11229
22/10/2019 16:00:00.000 | Chart-Idx 188 Chart-OpenTime 22.10.2019 16:00:00 Tf-X-Idx 76 Tf-X-OpenTime 21.10.2019 21:00:00 Tf-X-High 1,11567 Tf-X-Low 1,11229
22/10/2019 15:00:00.000 | Chart-Idx 187 Chart-OpenTime 22.10.2019 15:00:00 Tf-X-Idx 76 Tf-X-OpenTime 21.10.2019 21:00:00 Tf-X-High 1,11567 Tf-X-Low 1,11229
22/10/2019 14:00:00.000 | Chart-Idx 186 Chart-OpenTime 22.10.2019 14:00:00 Tf-X-Idx 76 Tf-X-OpenTime 21.10.2019 21:00:00 Tf-X-High 1,11567 Tf-X-Low 1,11229
22/10/2019 13:00:00.000 | Chart-Idx 185 Chart-OpenTime 22.10.2019 13:00:00 Tf-X-Idx 76 Tf-X-OpenTime 21.10.2019 21:00:00 Tf-X-High 1,11567 Tf-X-Low 1,11229
22/10/2019 12:00:00.000 | Chart-Idx 184 Chart-OpenTime 22.10.2019 12:00:00 Tf-X-Idx 76 Tf-X-OpenTime 21.10.2019 21:00:00 Tf-X-High 1,11567 Tf-X-Low 1,11332
22/10/2019 11:00:00.000 | Chart-Idx 183 Chart-OpenTime 22.10.2019 11:00:00 Tf-X-Idx 76 Tf-X-OpenTime 21.10.2019 21:00:00 Tf-X-High 1,11567 Tf-X-Low 1,11332
22/10/2019 10:00:00.000 | Chart-Idx 182 Chart-OpenTime 22.10.2019 10:00:00 Tf-X-Idx 76 Tf-X-OpenTime 21.10.2019 21:00:00 Tf-X-High 1,11567 Tf-X-Low 1,11332
22/10/2019 09:00:00.000 | Chart-Idx 181 Chart-OpenTime 22.10.2019 09:00:00 Tf-X-Idx 76 Tf-X-OpenTime 21.10.2019 21:00:00 Tf-X-High 1,11567 Tf-X-Low 1,11332
22/10/2019 08:00:00.000 | Chart-Idx 180 Chart-OpenTime 22.10.2019 08:00:00 Tf-X-Idx 76 Tf-X-OpenTime 21.10.2019 21:00:00 Tf-X-High 1,11567 Tf-X-Low 1,11423
22/10/2019 07:00:00.000 | Chart-Idx 179 Chart-OpenTime 22.10.2019 07:00:00 Tf-X-Idx 76 Tf-X-OpenTime 21.10.2019 21:00:00 Tf-X-High 1,11567 Tf-X-Low 1,11439
22/10/2019 06:00:00.000 | Chart-Idx 178 Chart-OpenTime 22.10.2019 06:00:00 Tf-X-Idx 76 Tf-X-OpenTime 21.10.2019 21:00:00 Tf-X-High 1,11567 Tf-X-Low 1,11439
22/10/2019 05:00:00.000 | Chart-Idx 177 Chart-OpenTime 22.10.2019 05:00:00 Tf-X-Idx 76 Tf-X-OpenTime 21.10.2019 21:00:00 Tf-X-High 1,11567 Tf-X-Low 1,11439
22/10/2019 04:00:00.000 | Chart-Idx 176 Chart-OpenTime 22.10.2019 04:00:00 Tf-X-Idx 76 Tf-X-OpenTime 21.10.2019 21:00:00 Tf-X-High 1,11567 Tf-X-Low 1,11439
22/10/2019 03:00:00.000 | Chart-Idx 175 Chart-OpenTime 22.10.2019 03:00:00 Tf-X-Idx 76 Tf-X-OpenTime 21.10.2019 21:00:00 Tf-X-High 1,11567 Tf-X-Low 1,11439
22/10/2019 02:00:00.000 | Chart-Idx 174 Chart-OpenTime 22.10.2019 02:00:00 Tf-X-Idx 76 Tf-X-OpenTime 21.10.2019 21:00:00 Tf-X-High 1,11567 Tf-X-Low 1,11439
22/10/2019 01:00:00.000 | Chart-Idx 173 Chart-OpenTime 22.10.2019 01:00:00 Tf-X-Idx 76 Tf-X-OpenTime 21.10.2019 21:00:00 Tf-X-High 1,11542 Tf-X-Low 1,11439
22/10/2019 00:00:00.000 | Chart-Idx 172 Chart-OpenTime 22.10.2019 00:00:00 Tf-X-Idx 76 Tf-X-OpenTime 21.10.2019 21:00:00 Tf-X-High 1,11527 Tf-X-Low 1,11439
21/10/2019 23:00:00.000 | Chart-Idx 171 Chart-OpenTime 21.10.2019 23:00:00 Tf-X-Idx 76 Tf-X-OpenTime 21.10.2019 21:00:00 Tf-X-High 1,11527 Tf-X-Low 1,11439
21/10/2019 22:00:00.000 | Chart-Idx 170 Chart-OpenTime 21.10.2019 22:00:00 Tf-X-Idx 76 Tf-X-OpenTime 21.10.2019 21:00:00 Tf-X-High 1,11518 Tf-X-Low 1,11439
21/10/2019 21:00:00.000 | Chart-Idx 169 Chart-OpenTime 21.10.2019 21:00:00 Tf-X-Idx 76 Tf-X-OpenTime 21.10.2019 21:00:00 Tf-X-High 1,11487 Tf-X-Low 1,11487
21/10/2019 20:00:00.000 | Chart-Idx 168 Chart-OpenTime 21.10.2019 20:00:00 Tf-X-Idx 75 Tf-X-OpenTime 20.10.2019 21:00:00 Tf-X-High 1,11794 Tf-X-Low 1,11385
21/10/2019 19:00:00.000 | Chart-Idx 167 Chart-OpenTime 21.10.2019 19:00:00 Tf-X-Idx 75 Tf-X-OpenTime 20.10.2019 21:00:00 Tf-X-High 1,11794 Tf-X-Low 1,11385
21/10/2019 18:00:00.000 | Chart-Idx 166 Chart-OpenTime 21.10.2019 18:00:00 Tf-X-Idx 75 Tf-X-OpenTime 20.10.2019 21:00:00 Tf-X-High 1,11794 Tf-X-Low 1,11385
21/10/2019 17:00:00.000 | Chart-Idx 165 Chart-OpenTime 21.10.2019 17:00:00 Tf-X-Idx 75 Tf-X-OpenTime 20.10.2019 21:00:00 Tf-X-High 1,11794 Tf-X-Low 1,11385
21/10/2019 16:00:00.000 | Chart-Idx 164 Chart-OpenTime 21.10.2019 16:00:00 Tf-X-Idx 75 Tf-X-OpenTime 20.10.2019 21:00:00 Tf-X-High 1,11794 Tf-X-Low 1,11385
21/10/2019 15:00:00.000 | Chart-Idx 163 Chart-OpenTime 21.10.2019 15:00:00 Tf-X-Idx 75 Tf-X-OpenTime 20.10.2019 21:00:00 Tf-X-High 1,11794 Tf-X-Low 1,11445
21/10/2019 14:00:00.000 | Chart-Idx 162 Chart-OpenTime 21.10.2019 14:00:00 Tf-X-Idx 75 Tf-X-OpenTime 20.10.2019 21:00:00 Tf-X-High 1,11794 Tf-X-Low 1,11496
21/10/2019 13:00:00.000 | Chart-Idx 161 Chart-OpenTime 21.10.2019 13:00:00 Tf-X-Idx 75 Tf-X-OpenTime 20.10.2019 21:00:00 Tf-X-High 1,11794 Tf-X-Low 1,11496
21/10/2019 12:00:00.000 | Chart-Idx 160 Chart-OpenTime 21.10.2019 12:00:00 Tf-X-Idx 75 Tf-X-OpenTime 20.10.2019 21:00:00 Tf-X-High 1,11794 Tf-X-Low 1,11496
21/10/2019 11:00:00.000 | Chart-Idx 159 Chart-OpenTime 21.10.2019 11:00:00 Tf-X-Idx 75 Tf-X-OpenTime 20.10.2019 21:00:00 Tf-X-High 1,11794 Tf-X-Low 1,11496
21/10/2019 10:00:00.000 | Chart-Idx 158 Chart-OpenTime 21.10.2019 10:00:00 Tf-X-Idx 75 Tf-X-OpenTime 20.10.2019 21:00:00 Tf-X-High 1,11794 Tf-X-Low 1,11496
21/10/2019 09:00:00.000 | Chart-Idx 157 Chart-OpenTime 21.10.2019 09:00:00 Tf-X-Idx 75 Tf-X-OpenTime 20.10.2019 21:00:00 Tf-X-High 1,11794 Tf-X-Low 1,11496
21/10/2019 08:00:00.000 | Chart-Idx 156 Chart-OpenTime 21.10.2019 08:00:00 Tf-X-Idx 75 Tf-X-OpenTime 20.10.2019 21:00:00 Tf-X-High 1,11668 Tf-X-Low 1,11496
21/10/2019 07:00:00.000 | Chart-Idx 155 Chart-OpenTime 21.10.2019 07:00:00 Tf-X-Idx 75 Tf-X-OpenTime 20.10.2019 21:00:00 Tf-X-High 1,11633 Tf-X-Low 1,115
21/10/2019 06:00:00.000 | Chart-Idx 154 Chart-OpenTime 21.10.2019 06:00:00 Tf-X-Idx 75 Tf-X-OpenTime 20.10.2019 21:00:00 Tf-X-High 1,11633 Tf-X-Low 1,115
21/10/2019 05:00:00.000 | Chart-Idx 153 Chart-OpenTime 21.10.2019 05:00:00 Tf-X-Idx 75 Tf-X-OpenTime 20.10.2019 21:00:00 Tf-X-High 1,11633 Tf-X-Low 1,115
21/10/2019 04:00:00.000 | Chart-Idx 152 Chart-OpenTime 21.10.2019 04:00:00 Tf-X-Idx 75 Tf-X-OpenTime 20.10.2019 21:00:00 Tf-X-High 1,11633 Tf-X-Low 1,115
21/10/2019 03:00:00.000 | Chart-Idx 151 Chart-OpenTime 21.10.2019 03:00:00 Tf-X-Idx 75 Tf-X-OpenTime 20.10.2019 21:00:00 Tf-X-High 1,11633 Tf-X-Low 1,115
21/10/2019 02:00:00.000 | Chart-Idx 150 Chart-OpenTime 21.10.2019 02:00:00 Tf-X-Idx 75 Tf-X-OpenTime 20.10.2019 21:00:00 Tf-X-High 1,11633 Tf-X-Low 1,115
21/10/2019 01:00:00.000 | Chart-Idx 149 Chart-OpenTime 21.10.2019 01:00:00 Tf-X-Idx 75 Tf-X-OpenTime 20.10.2019 21:00:00 Tf-X-High 1,11633 Tf-X-Low 1,115
21/10/2019 00:00:00.000 | Chart-Idx 148 Chart-OpenTime 21.10.2019 00:00:00 Tf-X-Idx 75 Tf-X-OpenTime 20.10.2019 21:00:00 Tf-X-High 1,11633 Tf-X-Low 1,115
20/10/2019 23:00:00.000 | Chart-Idx 147 Chart-OpenTime 20.10.2019 23:00:00 Tf-X-Idx 75 Tf-X-OpenTime 20.10.2019 21:00:00 Tf-X-High 1,11633 Tf-X-Low 1,115
20/10/2019 22:00:00.000 | Chart-Idx 146 Chart-OpenTime 20.10.2019 22:00:00 Tf-X-Idx 75 Tf-X-OpenTime 20.10.2019 21:00:00 Tf-X-High 1,11633 Tf-X-Low 1,115
20/10/2019 21:00:00.000 | Chart-Idx 145 Chart-OpenTime 20.10.2019 21:00:00 Tf-X-Idx 75 Tf-X-OpenTime 20.10.2019 21:00:00 Tf-X-High 1,11627 Tf-X-Low 1,11627
18/10/2019 20:00:00.000 | Chart-Idx 144 Chart-OpenTime 18.10.2019 20:00:00 Tf-X-Idx 74 Tf-X-OpenTime 17.10.2019 21:00:00 Tf-X-High 1,11724 Tf-X-Low 1,11146
18/10/2019 19:00:00.000 | Chart-Idx 143 Chart-OpenTime 18.10.2019 19:00:00 Tf-X-Idx 74 Tf-X-OpenTime 17.10.2019 21:00:00 Tf-X-High 1,11724 Tf-X-Low 1,11146
18/10/2019 18:00:00.000 | Chart-Idx 142 Chart-OpenTime 18.10.2019 18:00:00 Tf-X-Idx 74 Tf-X-OpenTime 17.10.2019 21:00:00 Tf-X-High 1,11724 Tf-X-Low 1,11146
18/10/2019 17:00:00.000 | Chart-Idx 141 Chart-OpenTime 18.10.2019 17:00:00 Tf-X-Idx 74 Tf-X-OpenTime 17.10.2019 21:00:00 Tf-X-High 1,11724 Tf-X-Low 1,11146
18/10/2019 16:00:00.000 | Chart-Idx 140 Chart-OpenTime 18.10.2019 16:00:00 Tf-X-Idx 74 Tf-X-OpenTime 17.10.2019 21:00:00 Tf-X-High 1,11724 Tf-X-Low 1,11146
18/10/2019 15:00:00.000 | Chart-Idx 139 Chart-OpenTime 18.10.2019 15:00:00 Tf-X-Idx 74 Tf-X-OpenTime 17.10.2019 21:00:00 Tf-X-High 1,11724 Tf-X-Low 1,11146
18/10/2019 14:00:00.000 | Chart-Idx 138 Chart-OpenTime 18.10.2019 14:00:00 Tf-X-Idx 74 Tf-X-OpenTime 17.10.2019 21:00:00 Tf-X-High 1,11724 Tf-X-Low 1,11146
18/10/2019 13:00:00.000 | Chart-Idx 137 Chart-OpenTime 18.10.2019 13:00:00 Tf-X-Idx 74 Tf-X-OpenTime 17.10.2019 21:00:00 Tf-X-High 1,11724 Tf-X-Low 1,11146
18/10/2019 12:00:00.000 | Chart-Idx 136 Chart-OpenTime 18.10.2019 12:00:00 Tf-X-Idx 74 Tf-X-OpenTime 17.10.2019 21:00:00 Tf-X-High 1,11724 Tf-X-Low 1,11146
18/10/2019 11:00:00.000 | Chart-Idx 135 Chart-OpenTime 18.10.2019 11:00:00 Tf-X-Idx 74 Tf-X-OpenTime 17.10.2019 21:00:00 Tf-X-High 1,11724 Tf-X-Low 1,11146
18/10/2019 10:00:00.000 | Chart-Idx 134 Chart-OpenTime 18.10.2019 10:00:00 Tf-X-Idx 74 Tf-X-OpenTime 17.10.2019 21:00:00 Tf-X-High 1,11724 Tf-X-Low 1,11146
18/10/2019 09:00:00.000 | Chart-Idx 133 Chart-OpenTime 18.10.2019 09:00:00 Tf-X-Idx 74 Tf-X-OpenTime 17.10.2019 21:00:00 Tf-X-High 1,11724 Tf-X-Low 1,11146
18/10/2019 08:00:00.000 | Chart-Idx 132 Chart-OpenTime 18.10.2019 08:00:00 Tf-X-Idx 74 Tf-X-OpenTime 17.10.2019 21:00:00 Tf-X-High 1,11724 Tf-X-Low 1,11146
18/10/2019 07:00:00.000 | Chart-Idx 131 Chart-OpenTime 18.10.2019 07:00:00 Tf-X-Idx 74 Tf-X-OpenTime 17.10.2019 21:00:00 Tf-X-High 1,11724 Tf-X-Low 1,11146
18/10/2019 06:00:00.000 | Chart-Idx 130 Chart-OpenTime 18.10.2019 06:00:00 Tf-X-Idx 74 Tf-X-OpenTime 17.10.2019 21:00:00 Tf-X-High 1,11724 Tf-X-Low 1,11146
18/10/2019 05:00:00.000 | Chart-Idx 129 Chart-OpenTime 18.10.2019 05:00:00 Tf-X-Idx 74 Tf-X-OpenTime 17.10.2019 21:00:00 Tf-X-High 1,11724 Tf-X-Low 1,11146
18/10/2019 04:00:00.000 | Chart-Idx 128 Chart-OpenTime 18.10.2019 04:00:00 Tf-X-Idx 74 Tf-X-OpenTime 17.10.2019 21:00:00 Tf-X-High 1,11724 Tf-X-Low 1,11146
18/10/2019 03:00:00.000 | Chart-Idx 127 Chart-OpenTime 18.10.2019 03:00:00 Tf-X-Idx 74 Tf-X-OpenTime 17.10.2019 21:00:00 Tf-X-High 1,11724 Tf-X-Low 1,11146
18/10/2019 02:00:00.000 | Chart-Idx 126 Chart-OpenTime 18.10.2019 02:00:00 Tf-X-Idx 74 Tf-X-OpenTime 17.10.2019 21:00:00 Tf-X-High 1,11724 Tf-X-Low 1,11146
18/10/2019 01:00:00.000 | Chart-Idx 125 Chart-OpenTime 18.10.2019 01:00:00 Tf-X-Idx 74 Tf-X-OpenTime 17.10.2019 21:00:00 Tf-X-High 1,11724 Tf-X-Low 1,11146
18/10/2019 00:00:00.000 | Backtesting started
2. Partial output from test-indicator using chart h1:
...
28/04/2020 10:03:36.565 | Chart-Idx 67 Chart-OpenTime 03.01.2020 21:00:00 Tf-X-Idx 1454 Tf-X-OpenTime 02.01.2020 22:00:00 Tf-X-High 1,11798 Tf-X-Low 1,11249
28/04/2020 10:03:36.565 | Chart-Idx 66 Chart-OpenTime 03.01.2020 20:00:00 Tf-X-Idx 1454 Tf-X-OpenTime 02.01.2020 22:00:00 Tf-X-High 1,11798 Tf-X-Low 1,11249
28/04/2020 10:03:36.565 | Chart-Idx 65 Chart-OpenTime 03.01.2020 19:00:00 Tf-X-Idx 1454 Tf-X-OpenTime 02.01.2020 22:00:00 Tf-X-High 1,11798 Tf-X-Low 1,11249
28/04/2020 10:03:36.565 | Chart-Idx 64 Chart-OpenTime 03.01.2020 18:00:00 Tf-X-Idx 1454 Tf-X-OpenTime 02.01.2020 22:00:00 Tf-X-High 1,11798 Tf-X-Low 1,11249
28/04/2020 10:03:36.565 | Chart-Idx 63 Chart-OpenTime 03.01.2020 17:00:00 Tf-X-Idx 1454 Tf-X-OpenTime 02.01.2020 22:00:00 Tf-X-High 1,11798 Tf-X-Low 1,11249
28/04/2020 10:03:36.565 | Chart-Idx 62 Chart-OpenTime 03.01.2020 16:00:00 Tf-X-Idx 1454 Tf-X-OpenTime 02.01.2020 22:00:00 Tf-X-High 1,11798 Tf-X-Low 1,11249
28/04/2020 10:03:36.565 | Chart-Idx 61 Chart-OpenTime 03.01.2020 15:00:00 Tf-X-Idx 1454 Tf-X-OpenTime 02.01.2020 22:00:00 Tf-X-High 1,11798 Tf-X-Low 1,11249
28/04/2020 10:03:36.565 | Chart-Idx 60 Chart-OpenTime 03.01.2020 14:00:00 Tf-X-Idx 1454 Tf-X-OpenTime 02.01.2020 22:00:00 Tf-X-High 1,11798 Tf-X-Low 1,11249
28/04/2020 10:03:36.565 | Chart-Idx 59 Chart-OpenTime 03.01.2020 13:00:00 Tf-X-Idx 1454 Tf-X-OpenTime 02.01.2020 22:00:00 Tf-X-High 1,11798 Tf-X-Low 1,11249
28/04/2020 10:03:36.565 | Chart-Idx 58 Chart-OpenTime 03.01.2020 12:00:00 Tf-X-Idx 1454 Tf-X-OpenTime 02.01.2020 22:00:00 Tf-X-High 1,11798 Tf-X-Low 1,11249
28/04/2020 10:03:36.565 | Chart-Idx 57 Chart-OpenTime 03.01.2020 11:00:00 Tf-X-Idx 1454 Tf-X-OpenTime 02.01.2020 22:00:00 Tf-X-High 1,11798 Tf-X-Low 1,11249
28/04/2020 10:03:36.565 | Chart-Idx 56 Chart-OpenTime 03.01.2020 10:00:00 Tf-X-Idx 1454 Tf-X-OpenTime 02.01.2020 22:00:00 Tf-X-High 1,11798 Tf-X-Low 1,11249
28/04/2020 10:03:36.565 | Chart-Idx 55 Chart-OpenTime 03.01.2020 09:00:00 Tf-X-Idx 1454 Tf-X-OpenTime 02.01.2020 22:00:00 Tf-X-High 1,11798 Tf-X-Low 1,11249
28/04/2020 10:03:36.565 | Chart-Idx 54 Chart-OpenTime 03.01.2020 08:00:00 Tf-X-Idx 1454 Tf-X-OpenTime 02.01.2020 22:00:00 Tf-X-High 1,11798 Tf-X-Low 1,11249
28/04/2020 10:03:36.565 | Chart-Idx 53 Chart-OpenTime 03.01.2020 07:00:00 Tf-X-Idx 1454 Tf-X-OpenTime 02.01.2020 22:00:00 Tf-X-High 1,11798 Tf-X-Low 1,11249
28/04/2020 10:03:36.565 | Chart-Idx 52 Chart-OpenTime 03.01.2020 06:00:00 Tf-X-Idx 1454 Tf-X-OpenTime 02.01.2020 22:00:00 Tf-X-High 1,11798 Tf-X-Low 1,11249
28/04/2020 10:03:36.565 | Chart-Idx 51 Chart-OpenTime 03.01.2020 05:00:00 Tf-X-Idx 1454 Tf-X-OpenTime 02.01.2020 22:00:00 Tf-X-High 1,11798 Tf-X-Low 1,11249
28/04/2020 10:03:36.565 | Chart-Idx 50 Chart-OpenTime 03.01.2020 04:00:00 Tf-X-Idx 1454 Tf-X-OpenTime 02.01.2020 22:00:00 Tf-X-High 1,11798 Tf-X-Low 1,11249
28/04/2020 10:03:36.565 | Chart-Idx 49 Chart-OpenTime 03.01.2020 03:00:00 Tf-X-Idx 1454 Tf-X-OpenTime 02.01.2020 22:00:00 Tf-X-High 1,11798 Tf-X-Low 1,11249
28/04/2020 10:03:36.565 | Chart-Idx 48 Chart-OpenTime 03.01.2020 02:00:00 Tf-X-Idx 1454 Tf-X-OpenTime 02.01.2020 22:00:00 Tf-X-High 1,11798 Tf-X-Low 1,11249
28/04/2020 10:03:36.549 | Chart-Idx 47 Chart-OpenTime 03.01.2020 01:00:00 Tf-X-Idx 1454 Tf-X-OpenTime 02.01.2020 22:00:00 Tf-X-High 1,11798 Tf-X-Low 1,11249
28/04/2020 10:03:36.549 | Chart-Idx 46 Chart-OpenTime 03.01.2020 00:00:00 Tf-X-Idx 1454 Tf-X-OpenTime 02.01.2020 22:00:00 Tf-X-High 1,11798 Tf-X-Low 1,11249
28/04/2020 10:03:36.549 | Chart-Idx 45 Chart-OpenTime 02.01.2020 23:00:00 Tf-X-Idx 1454 Tf-X-OpenTime 02.01.2020 22:00:00 Tf-X-High 1,11798 Tf-X-Low 1,11249
28/04/2020 10:03:36.549 | Chart-Idx 44 Chart-OpenTime 02.01.2020 22:00:00 Tf-X-Idx 1454 Tf-X-OpenTime 02.01.2020 22:00:00 Tf-X-High 1,11798 Tf-X-Low 1,11249
28/04/2020 10:03:36.549 | Chart-Idx 43 Chart-OpenTime 02.01.2020 21:00:00 Tf-X-Idx 1453 Tf-X-OpenTime 01.01.2020 22:00:00 Tf-X-High 1,12142 Tf-X-Low 1,11634
28/04/2020 10:03:36.549 | Chart-Idx 42 Chart-OpenTime 02.01.2020 20:00:00 Tf-X-Idx 1453 Tf-X-OpenTime 01.01.2020 22:00:00 Tf-X-High 1,12142 Tf-X-Low 1,11634
28/04/2020 10:03:36.549 | Chart-Idx 41 Chart-OpenTime 02.01.2020 19:00:00 Tf-X-Idx 1453 Tf-X-OpenTime 01.01.2020 22:00:00 Tf-X-High 1,12142 Tf-X-Low 1,11634
28/04/2020 10:03:36.549 | Chart-Idx 40 Chart-OpenTime 02.01.2020 18:00:00 Tf-X-Idx 1453 Tf-X-OpenTime 01.01.2020 22:00:00 Tf-X-High 1,12142 Tf-X-Low 1,11634
28/04/2020 10:03:36.549 | Chart-Idx 39 Chart-OpenTime 02.01.2020 17:00:00 Tf-X-Idx 1453 Tf-X-OpenTime 01.01.2020 22:00:00 Tf-X-High 1,12142 Tf-X-Low 1,11634
28/04/2020 10:03:36.549 | Chart-Idx 38 Chart-OpenTime 02.01.2020 16:00:00 Tf-X-Idx 1453 Tf-X-OpenTime 01.01.2020 22:00:00 Tf-X-High 1,12142 Tf-X-Low 1,11634
28/04/2020 10:03:36.549 | Chart-Idx 37 Chart-OpenTime 02.01.2020 15:00:00 Tf-X-Idx 1453 Tf-X-OpenTime 01.01.2020 22:00:00 Tf-X-High 1,12142 Tf-X-Low 1,11634
28/04/2020 10:03:36.549 | Chart-Idx 36 Chart-OpenTime 02.01.2020 14:00:00 Tf-X-Idx 1453 Tf-X-OpenTime 01.01.2020 22:00:00 Tf-X-High 1,12142 Tf-X-Low 1,11634
28/04/2020 10:03:36.549 | Chart-Idx 35 Chart-OpenTime 02.01.2020 13:00:00 Tf-X-Idx 1453 Tf-X-OpenTime 01.01.2020 22:00:00 Tf-X-High 1,12142 Tf-X-Low 1,11634
28/04/2020 10:03:36.549 | Chart-Idx 34 Chart-OpenTime 02.01.2020 12:00:00 Tf-X-Idx 1453 Tf-X-OpenTime 01.01.2020 22:00:00 Tf-X-High 1,12142 Tf-X-Low 1,11634
28/04/2020 10:03:36.549 | Chart-Idx 33 Chart-OpenTime 02.01.2020 11:00:00 Tf-X-Idx 1453 Tf-X-OpenTime 01.01.2020 22:00:00 Tf-X-High 1,12142 Tf-X-Low 1,11634
28/04/2020 10:03:36.549 | Chart-Idx 32 Chart-OpenTime 02.01.2020 10:00:00 Tf-X-Idx 1453 Tf-X-OpenTime 01.01.2020 22:00:00 Tf-X-High 1,12142 Tf-X-Low 1,11634
28/04/2020 10:03:36.549 | Chart-Idx 31 Chart-OpenTime 02.01.2020 09:00:00 Tf-X-Idx 1453 Tf-X-OpenTime 01.01.2020 22:00:00 Tf-X-High 1,12142 Tf-X-Low 1,11634
28/04/2020 10:03:36.549 | Chart-Idx 30 Chart-OpenTime 02.01.2020 08:00:00 Tf-X-Idx 1453 Tf-X-OpenTime 01.01.2020 22:00:00 Tf-X-High 1,12142 Tf-X-Low 1,11634
28/04/2020 10:03:36.549 | Chart-Idx 29 Chart-OpenTime 02.01.2020 07:00:00 Tf-X-Idx 1453 Tf-X-OpenTime 01.01.2020 22:00:00 Tf-X-High 1,12142 Tf-X-Low 1,11634
28/04/2020 10:03:36.549 | Chart-Idx 28 Chart-OpenTime 02.01.2020 06:00:00 Tf-X-Idx 1453 Tf-X-OpenTime 01.01.2020 22:00:00 Tf-X-High 1,12142 Tf-X-Low 1,11634
28/04/2020 10:03:36.549 | Chart-Idx 27 Chart-OpenTime 02.01.2020 05:00:00 Tf-X-Idx 1453 Tf-X-OpenTime 01.01.2020 22:00:00 Tf-X-High 1,12142 Tf-X-Low 1,11634
28/04/2020 10:03:36.549 | Chart-Idx 26 Chart-OpenTime 02.01.2020 04:00:00 Tf-X-Idx 1453 Tf-X-OpenTime 01.01.2020 22:00:00 Tf-X-High 1,12142 Tf-X-Low 1,11634
28/04/2020 10:03:36.549 | Chart-Idx 25 Chart-OpenTime 31.12.2019 18:00:00 Tf-X-Idx 1452 Tf-X-OpenTime 30.12.2019 22:00:00 Tf-X-High 1,1239 Tf-X-Low 1,11975
28/04/2020 10:03:36.533 | Chart-Idx 24 Chart-OpenTime 31.12.2019 17:00:00 Tf-X-Idx 1452 Tf-X-OpenTime 30.12.2019 22:00:00 Tf-X-High 1,1239 Tf-X-Low 1,11975
28/04/2020 10:03:36.533 | Chart-Idx 23 Chart-OpenTime 31.12.2019 16:00:00 Tf-X-Idx 1452 Tf-X-OpenTime 30.12.2019 22:00:00 Tf-X-High 1,1239 Tf-X-Low 1,11975
28/04/2020 10:03:36.533 | Chart-Idx 22 Chart-OpenTime 31.12.2019 15:00:00 Tf-X-Idx 1452 Tf-X-OpenTime 30.12.2019 22:00:00 Tf-X-High 1,1239 Tf-X-Low 1,11975
28/04/2020 10:03:36.533 | Chart-Idx 21 Chart-OpenTime 31.12.2019 14:00:00 Tf-X-Idx 1452 Tf-X-OpenTime 30.12.2019 22:00:00 Tf-X-High 1,1239 Tf-X-Low 1,11975
28/04/2020 10:03:36.533 | Chart-Idx 20 Chart-OpenTime 31.12.2019 13:00:00 Tf-X-Idx 1452 Tf-X-OpenTime 30.12.2019 22:00:00 Tf-X-High 1,1239 Tf-X-Low 1,11975
28/04/2020 10:03:36.533 | Chart-Idx 19 Chart-OpenTime 31.12.2019 12:00:00 Tf-X-Idx 1452 Tf-X-OpenTime 30.12.2019 22:00:00 Tf-X-High 1,1239 Tf-X-Low 1,11975
28/04/2020 10:03:36.533 | Chart-Idx 18 Chart-OpenTime 31.12.2019 11:00:00 Tf-X-Idx 1452 Tf-X-OpenTime 30.12.2019 22:00:00 Tf-X-High 1,1239 Tf-X-Low 1,11975
28/04/2020 10:03:36.533 | Chart-Idx 17 Chart-OpenTime 31.12.2019 10:00:00 Tf-X-Idx 1452 Tf-X-OpenTime 30.12.2019 22:00:00 Tf-X-High 1,1239 Tf-X-Low 1,11975
28/04/2020 10:03:36.533 | Chart-Idx 16 Chart-OpenTime 31.12.2019 09:00:00 Tf-X-Idx 1452 Tf-X-OpenTime 30.12.2019 22:00:00 Tf-X-High 1,1239 Tf-X-Low 1,11975
28/04/2020 10:03:36.533 | Chart-Idx 15 Chart-OpenTime 31.12.2019 08:00:00 Tf-X-Idx 1452 Tf-X-OpenTime 30.12.2019 22:00:00 Tf-X-High 1,1239 Tf-X-Low 1,11975
28/04/2020 10:03:36.533 | Chart-Idx 14 Chart-OpenTime 31.12.2019 07:00:00 Tf-X-Idx 1452 Tf-X-OpenTime 30.12.2019 22:00:00 Tf-X-High 1,1239 Tf-X-Low 1,11975
28/04/2020 10:03:36.533 | Chart-Idx 13 Chart-OpenTime 31.12.2019 06:00:00 Tf-X-Idx 1452 Tf-X-OpenTime 30.12.2019 22:00:00 Tf-X-High 1,1239 Tf-X-Low 1,11975
28/04/2020 10:03:36.533 | Chart-Idx 12 Chart-OpenTime 31.12.2019 05:00:00 Tf-X-Idx 1452 Tf-X-OpenTime 30.12.2019 22:00:00 Tf-X-High 1,1239 Tf-X-Low 1,11975
28/04/2020 10:03:36.533 | Chart-Idx 11 Chart-OpenTime 31.12.2019 04:00:00 Tf-X-Idx 1452 Tf-X-OpenTime 30.12.2019 22:00:00 Tf-X-High 1,1239 Tf-X-Low 1,11975
28/04/2020 10:03:36.533 | Chart-Idx 10 Chart-OpenTime 31.12.2019 03:00:00 Tf-X-Idx 1452 Tf-X-OpenTime 30.12.2019 22:00:00 Tf-X-High 1,1239 Tf-X-Low 1,11975
28/04/2020 10:03:36.533 | Chart-Idx 9 Chart-OpenTime 31.12.2019 02:00:00 Tf-X-Idx 1452 Tf-X-OpenTime 30.12.2019 22:00:00 Tf-X-High 1,1239 Tf-X-Low 1,11975
28/04/2020 10:03:36.533 | Chart-Idx 8 Chart-OpenTime 31.12.2019 01:00:00 Tf-X-Idx 1452 Tf-X-OpenTime 30.12.2019 22:00:00 Tf-X-High 1,1239 Tf-X-Low 1,11975
28/04/2020 10:03:36.533 | Chart-Idx 7 Chart-OpenTime 31.12.2019 00:00:00 Tf-X-Idx 1452 Tf-X-OpenTime 30.12.2019 22:00:00 Tf-X-High 1,1239 Tf-X-Low 1,11975
28/04/2020 10:03:36.533 | Chart-Idx 6 Chart-OpenTime 30.12.2019 23:00:00 Tf-X-Idx 1452 Tf-X-OpenTime 30.12.2019 22:00:00 Tf-X-High 1,1239 Tf-X-Low 1,11975
28/04/2020 10:03:36.533 | Chart-Idx 5 Chart-OpenTime 30.12.2019 22:00:00 Tf-X-Idx 1452 Tf-X-OpenTime 30.12.2019 22:00:00 Tf-X-High 1,1239 Tf-X-Low 1,11975
28/04/2020 10:03:36.533 | Chart-Idx 4 Chart-OpenTime 30.12.2019 21:00:00 Tf-X-Idx 1451 Tf-X-OpenTime 29.12.2019 22:00:00 Tf-X-High 1,12207 Tf-X-Low 1,11713
28/04/2020 10:03:36.533 | Chart-Idx 3 Chart-OpenTime 30.12.2019 20:00:00 Tf-X-Idx 1451 Tf-X-OpenTime 29.12.2019 22:00:00 Tf-X-High 1,12207 Tf-X-Low 1,11713
28/04/2020 10:03:36.533 | Chart-Idx 2 Chart-OpenTime 30.12.2019 19:00:00 Tf-X-Idx 1451 Tf-X-OpenTime 29.12.2019 22:00:00 Tf-X-High 1,12207 Tf-X-Low 1,11713
28/04/2020 10:03:36.533 | Chart-Idx 1 Chart-OpenTime 30.12.2019 18:00:00 Tf-X-Idx 1451 Tf-X-OpenTime 29.12.2019 22:00:00 Tf-X-High 1,12207 Tf-X-Low 1,11713
28/04/2020 10:03:36.533 | Chart-Idx 0 Chart-OpenTime 30.12.2019 17:00:00 Tf-X-Idx 1451 Tf-X-OpenTime 29.12.2019 22:00:00 Tf-X-High 1,12207 Tf-X-Low 1,11713
Please notice that in the bot the d1-prices correctly changes during the d1-Bar with the progress the h1-chart-bars are making.
But in the indicator the d1-prices do NOT change during the d1-Bar, so all the past-bars / its data from the other timeframe are already completely finished (all prices are final).
It is self explanatory that the data is useless in that case, because it is messing everything up, because i have already the final-prices of a d1-bar just right at the beginning of that d1-bar.
In my opinion that is really critical and i hope that you can help us with this to get that fixed as soon as possible.
Thank you in advance,
Andreas
Replies
PanagiotisCharalampous
30 Apr 2020, 12:37
Hi Andreas,
I have forwarded this to the product team. I will let you know as soon as I have a reply.
Best Regards,
Panagiotis
@PanagiotisCharalampous
andi21
25 May 2020, 12:44
RE: RE:
Hi Panagiotis,
is there any update on this subject?
I think this is very important, because it affects all customers who are using an indicator with a timeframe other than the chart-timeframe and who are relying on the data which is calculated through the initial calculate from cTrader (past until now).
Best Regards,
Andreas
@andi21
PanagiotisCharalampous
27 May 2020, 12:28
Hi Andreas,
We have investigated this issue and we understand the problem you are facing. However GetBars() works as designed. When you get bars from other timeframes, you get all the finalized bars and finalized values. You should be aware of this fact when you use these values. We do not plan to change the way it works at the moment. Hence if this functionality does not fit the needs of your indicator then you will need to redesign your indicator and code it in a different way.
Best Regards,
Panagiotis
@PanagiotisCharalampous
andi21
27 May 2020, 13:28
RE:
PanagiotisCharalampous said:
Hi Andreas,
We have investigated this issue and we understand the problem you are facing. However GetBars() works as designed. When you get bars from other timeframes, you get all the finalized bars and finalized values. You should be aware of this fact when you use these values. We do not plan to change the way it works at the moment. Hence if this functionality does not fit the needs of your indicator then you will need to redesign your indicator and code it in a different way.
Best Regards,
Panagiotis
Hi Panagiotis,
in this case i have to think about how to workaround this behaviour.
Nevertheless i thank you for your answer and that you have taken time to investigate this issue.
Best Regards,
Andreas
@andi21
andi21
30 Apr 2020, 12:21
Hello Spotware Team,
could you have a look at the topic i posted 2 days ago, please?
Thank you,
Andreas
@andi21