I need to change in my code (which works ok in a minute chart) to run the calculations from BarsInProgress==1 (= minutes) because I want to add the indicator on my tickcharts (I would have too many charts when for all instruments the tickchart and always a minutechart for the calculations). But when adding if(BIP==1)... it doesnt work.
if(BarsInProgress==1)
{
bool isTime = Time[0].TimeOfDay.CompareTo(startTime)>=0 && (Time[1].TimeOfDay.CompareTo(startTime)<0 || Time[0].Date!=Time[1].Date);
// calculations for Tprice
if (isTime)
{LineStyle[0] = Closes[1][0]; Tprice=LineStyle[0];}
else if (LineStyle.IsValidDataPoint(1))
{LineStyle[0] = LineStyle[1]; Tprice=LineStyle[0];}
}
This works in a minutechart, but my line is not plotted in a tickchart. What do I miss please?
Thank you!
Tony

Comment