this is the code: load it in minitue 1 chart
#region Variables
private DataSeries myDS;
#endregion
protected override void Initialize()
{
CalculateOnBarClose = true;
Add(PeriodType.Day,1);
myDS=new DataSeries(this);
}
protected override void OnBarUpdate()
{
if(BarsInProgress==1)
{
myDS.Set(Highs[1][0] - Lows[1][0]);
Print(Time[0].ToString()+" "+CurrentBar+" A New Day"+myDS[0].ToString("0.00")+" "+myDS[1].ToString("0.00")+" "+myDS[2].ToString("0.00"));
}
}
You will find the DataSeries is Only Get the Last One,previous is Wrong....
The DataSeries Can't Be Use .
Comment