In the following code when I plot “Paint”, Draw in the 1 minute chart the 5minute result at least all its ok (Notice: the indicator draw each 5 bars)
protected override void Initialize()
{
Add(PeriodType.Minute, 5 );
}
protected override void OnBarUpdate()
{
if (BarsInProgress == 1 )
{
Paint.Set(SUM(Close,10)[ 0 ]);
}
}
How ever when i change the following code Notice I’m changing “Close” by “X”)
#region Variables
private DataSeries X ;
#endregion
protected override void Initialize()
{
Add (PeriodType.Minute, 5 );
X = new DataSeries( this ) ;
}
protected override void OnBarUpdate()
{
if (BarsInProgress == 1 )
{
…
Paint.Set(SUM( X ,10)[ 0 ]);
}
}
“X”save a radom value and “Paint” draw a plot totally different in 1 minute chart about 5 min chart.
IM INTERESTED TO KNOW WHAT MODIFICATION I MUST TO DO IN THE CODE TO GET THE3 SAME PLOT IN THE 1 MIN AS 5 MINUTE CHART.
I will hope any guide to do that correctly.
Best regards.
Im ataching showing the Plot Problem
Comment