how to Make a quick Renko

 

hi every one I'm looking for a way to open and read MT5 stored ticks with mql5.

I used to do it with CopyTicks , but it slowed down the computer.

I have two questions:

1- how can i read the history file (history of ticks) with FileOpen function?(What's its name and where's the address? ) ( Does that help or not? )

2-I've made a Renko myself, but it's very slow and it's not as fast as the original Renko.

For example, my Ranko will add 40 million ticks to the Renko chart in 20 seconds, but the original Renco will fix it in less than a few seconds.

Do you have any information about how the original Ranko works so quickly? And how can I do that with my expert?

 
Amini1382:hi every one I'm looking for a way to open and read MT5 stored ticks with mql5. I used to do it with CopyTicks , but it slowed down the computer. I have two questions:

1- how can i read the history file (history of ticks) with FileOpen function?(What's its name and where's the address? ) ( Does that help or not? )

2-I've made a Renko myself, but it's very slow and it's not as fast as the original Renko.

For example, my Ranko will add 40 million ticks to the Renko chart in 20 seconds, but the original Renco will fix it in less than a few seconds. Do you have any information about how the original Ranko works so quickly? And how can I do that with my expert?

What "original Renko"? There is no such thing on MetaTrader.

On MetaTrader, all Renko are generated either from ticks or M1 bars by an Indicator, EA or a Service, either as Indicator drawn candles, or via Custom Symbols (MT5).

You also cannot access history files via "FileOpen". All the data is encrypted and can only be access via the MQL language functions.

 
Fernando Carreiro #:

What "original Renko"? There is no such thing on MetaTrader.

On MetaTrader, all Renko are generated either from ticks or M1 bars by an Indicator, EA or a Service, either as Indicator drawn candles, or via Custom Symbols (MT5).

You also cannot access history files via "FileOpen". All the data is encrypted and can only be access via the MQL language functions.

im sorry you right . i meant <Deleted>

My main problem is that my ranko is slow.

How can <Deleted> turn a few billion ticks into a renko candle in seconds?

I've tried it before and it was exactly based on ticks, not closes and open candles etc.Do you have information about this wonderful speed?

Other question, except shortening the code and optimizing it another, Do you know can i increase the speed of the expert in code execution with mql5 or general options in MT5?

 
Amini1382 #: im sorry you right . i meant ***. My main problem is that my ranko is slow. How can *** turn a few billion ticks into a renko candle in seconds?

I've tried it before and it was exactly based on ticks, not closes and open candles etc. Do you have information about this wonderful speed?

Other question, except shortening the code and optimizing it another, Do you know can i increase the speed of the expert in code execution with mql5 or general options in MT5?

That is a 3rd party tool that shouldn't be discussed here.

I have my own Renko generators that I have coded, but I did nothing special to achieve the speed, except normal efficient coding practices. They are however integrated into other functionality, so I'm not willing to share the code.

However, there are several Renko generators in the CodeBase. Have a look at them and how they are implemented.

 
Fernando Carreiro #:

That is a 3rd party tool that should be discussed here.

I have my own Renko generators that I have coded, but I did nothing special to achieve the speed, except normal efficient coding practices. They are however integrated into other functionality, so I'm not willing to share the code.

However, there are several Renko generators in the CodeBase. Have a look at them and how they are implemented.

Thank you for your answer.

The last question is that you said in the above answers that with the expert you can access the historia file to get the ticks.

How can I access it? I mean, can you access them only with mql5 or do they want other settings in meta-editor or metatrader?

And which methods should I use? (fileopen, etc.)

please guide me.

 
Amini1382 #: Thank you for your answer. The last question is that you said in the above answers that with the expert you can access the historia file to get the ticks. How can I access it? I mean, can you access them only with mql5 or do they want other settings in meta-editor or metatrader?

And which methods should I use? (fileopen, etc.). please guide me.

I have answered that in a previous post ... "You also cannot access history files via "FileOpen". All the data is encrypted and can only be access via the MQL language functions."

Look at the Renko generators in the CodeBase, For accessing ticks, use ...

CopyTicks

Gets ticks in the MqlTick format into ticks_array

CopyTicksRange

Gets ticks in the MqlTick format within the specified date range to ticks_array

For accessing M1 data use ...

CopyRates

Gets history data of the Rates structure for a specified symbol and period into an array