I'm transfering an indicator from MT5 to MT4.
But the OnCalculate is based on data array.
The function is called in the indicators when the Calculate event occurs for processing price data changes. There are two function types. Only one of them can be used within a single indicator.
Calculation based on data array
int OnCalculate( const int rates_total, // price array size const int prev_calculated, // number of handled bars at the previous call const int begin, // index number in the price array meaningful data starts from const double& price // array of values for calculation );
Is this possible to do in mt4? And how?
Do you see that form in the MT4 documentation? Event Handling Functions - Functions - Language Basics - MQL4 Reference