Force a tick by calling OnCalculate() from a chart event - page 2

 
I changed it to CHARTEVENT_CHART_CHANGE and it works perfect! Thanks for your help!
 
AaronJStuart:

This is an mql4 forum, please post mql4 code.

Your code doesn't provide a solution for the OP issue.

 
AaronJStuart:

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.

Reason: