OnCalculate Problem for Convert Candlestick Indicator to EA


I want make Candlestick EA in one file mql5. no dass library…

So I want convert Candlestick Indicator to Expert Advisor…but have problem with OnCalculate… OnCalculate only for indicator…For Expert Advisor only ontick…

For EA this not able to use this OnCalculate:

How solution?

So what ? Use OnTick() and get the data yourself (CopyHigh, CopyLow…).

problem solved…thanks

I’m sorry, what about the rates_total and prev_calculated?

I am not sure what you are asking for ?