I am facing an issue with moving a value computed (and stored in a dataseries) at a lower time frequency (TF2) to a dataseries of a higher time frequency (TF1).
The code is as per below.
1. Define the dataseries with different data timeframes:
if (myAbsOpenCloseSeries == null)
{
myAbsOpenCloseSeries = new DataSeries(SMA(BarsArray[1],5));
myAbsMedianSeries = new DataSeries(SMA(BarsArray[1],5));
}
myUpBreakoutSeries = new DataSeries(this);
2. On the lower timeframe, run a statistic computation (working correctly)
3. Calling the statistic to the higher time frame dataseries when they are in sync else copying/paste the previous data (where my issue is)
if (BarsInProgress == 0)
{
// NOT WORKING: EMTPY DATA IN THE TWO DATASERIES //
myUpBreakoutSeries.Set(myUpBreakoutSeries[1]);
if (Times[0][0].Ticks == Times[1][0].Ticks)
// WORKING //
{
maUpOpenBreak = Opens[0][0] + myAbsMedianSeries[1];
myUpBreakoutSeries.Set(maUpOpenBreak);
}
Thank you very much,
Best
Nicolas
Comment