First of all, what you want to realize is just about Chart Display which is unconcerned to OnCalculate() function, you just need to code in ChartEvent Function,and use ChartRedraw() on the end;
Secondly,if you want to call OnCalculate(), you can do like this:
This is an mql4 forum, please post mql4 code.
Your code doesn't provide a solution for the OP issue.
Post has been deleted
First of all, what you want to realize is just about Chart Display which is unconcerned to OnCalculate() function, you just need to code in ChartEvent Function,and use ChartRedraw() on the end;
Secondly,if you want to call OnCalculate(), you can do like this:
//**********************************************************************************************
int Tempspread[];
OnCalculate(Bars,0,Time,Open,High,Low,Close,Volume,Volume,Tempspread);
//**********************************************************************************************
Actually it can redraw the chart, but the last 2 params on the end are not safe,this call might bring some troubles that we don't know.