How to find every single tick info ?

 

Hi 

I need to collect ticks info.

I use some codes to calculate them .

there are 4 types of ticks  :

Ascending Ask 

descending Ask

Ascending Bid

descending Bid

( I don't know if there are ticks without motion or not ! )// please let me know if there are. 

I'm collecting these 4 and add to each other and its usually equal with the Volume .

but some times it's count a little less and I think the problem can be with internet connection.

when connection's missing for 1  or two second we miss some ticks.

So I need to access to the ticks history , but I can't find something like what I need.


Due to the tick chart, I think there is some where collecting ticks info and we can get access to this info.

I need it , any help please?


 
Reza nasimi:

Hi 

I need to collect ticks info.

I use some codes to calculate them .

there are 4 types of ticks  :

Ascending Ask 

descending Ask

Ascending Bid

descending Bid

( I don't know if there are ticks without motion or not ! )// please let me know if there are. 

I'm collecting these 4 and add to each other and its usually equal with the Volume .

but some times it's count a little less and I think the problem can be with internet connection.

when connection's missing for 1  or two second we miss some ticks.

So I need to access to the ticks history , but I can't find something like what I need.


Due to the tick chart, I think there is some where collecting ticks info and we can get access to this info.

I need it , any help please?


You can use OnTick event. Then collect any data you need from elements of MqlTick structure.
 
Mohammad Hossein Sadeghi:
You can use OnTick event. Then collect any data you need from elements of MqlTick structure.

Hi Mohammad Hossein Sadeghi

thanks , But I don't know how to use it.

I tried with MqlTick before but I couldn't find something helpful .

what do you mean by "You can use OnTick event" ?

I know Ontick as function and I don't know about events.

so I searched for event word and I find this page .

there was no Ontick event.
Would you please explain more ?

Working with Events - MQL4 Reference
Working with Events - MQL4 Reference
  • docs.mql4.com
Working with Events - MQL4 Reference
 
Reza nasimi:

Hi Mohammad Hossein Sadeghi

thanks , But I don't know how to use it.

I tried with MqlTick before but I couldn't find something helpful .

what do you mean by "You can use OnTick event" ?

I know Ontick as function and I don't know about events.

so I searched for event word and I find this page .

there was no Ontick event.
Would you please explain more ?

The page you found describes function that set timer for OnTimer event, please read this page:

https://www.mql5.com/en/docs/basis/function/events

OnTick event is a function and it is fired every time new tick arrives in termianl.

Documentation on MQL5: Language Basics / Functions / Event Handling Functions
Documentation on MQL5: Language Basics / Functions / Event Handling Functions
  • www.mql5.com
Language Basics / Functions / Event Handling Functions - Reference on algorithmic/automated trading language for MetaTrader 5
 
Mohammad Hossein Sadeghi:

The page you found describes function that set timer for OnTimer event, please read this page:

https://www.mql5.com/en/docs/basis/function/events

OnTick event is a function and it is fired every time new tick arrives in termianl.


thank you Mohammad Hossein Sadeghi

Can you give me a small example ?

 

any help ?

 
Reza nasimi:

I'm collecting these 4 and add to each other and its usually equal with the Volume .

but some times it's count a little less and I think the problem can be with internet connection.

when connection's missing for 1  or two second we miss some ticks.

So I need to access to the ticks history , but I can't find something like what I need.


Due to the tick chart, I think there is some where collecting ticks info and we can get access to this info.



No, the MT4 platform does not save ticks. If you need to access the tick history you should use MT5. In MT4 it is not possible. In MT4 all you can do is to save the tick information by yourself (with the help of an EA), but, as you said, you will never be able to save all the ticks (at certain times there are many ticks in a very short time and the EA you use to save them takes longer to run and you lose some ticks, and also you can lose connection with the broker or you can have cuts of your Internet connection, etc, etc).


Regards.

 
Jose Francisco Casado Fernandez:


No, the MT4 platform does not save ticks. If you need to access the tick history you should use MT5. In MT4 it is not possible. In MT4 all you can do is to save the tick information by yourself (with the help of an EA), but, as you said, you will never be able to save all the ticks (at certain times there are many ticks in a very short time and the EA you use to save them takes longer to run and you lose some ticks, and also you can lose connection with the broker or you can have cuts of your Internet connection, etc, etc).


Regards.


Thank you very much Jose Francisco Casado Fernandez

 
Reza nasimi:

Thank you very much Jose Francisco Casado Fernandez

You are welcome.  Regards-
 
Jose Francisco Casado Fernandez:


No, the MT4 platform does not save ticks. If you need to access the tick history you should use MT5. In MT4 it is not possible. In MT4 all you can do is to save the tick information by yourself (with the help of an EA), but, as you said, you will never be able to save all the ticks (at certain times there are many ticks in a very short time and the EA you use to save them takes longer to run and you lose some ticks, and also you can lose connection with the broker or you can have cuts of your Internet connection, etc, etc).


Regards.

Hi,
How could you be so sure? In a first place, I thought like you explained. The reality that still makes me doubt it is the fact that if you run your strategy tester every single tick, you will see all your ticks instead of you OHLC prices for each candle only. There must be a big file somewherein which all these ticks are save, I guess.
Reason: