MetaTrader 4 has no built-in tick chart: its timeframes run only from M1 to MN. To get a tick chart in MT4 you run two small indicators, one that logs every incoming tick from a live M1 chart and one that converts those ticks into bars of N ticks on an offline chart. This guide shows how to set up tick charts in Metatrader 4, using a 5 tick EURUSD chart as the example.

Key takeaways
- Tick charts print a new bar after a fixed number of trades (ticks), not after a fixed amount of time.
- MT4 only offers time-based timeframes (M1, M5, M15, M30, H1, H4, D1, W1, MN), so tick charts need the LogTickData and PostTickData indicators.
- Keep the source M1 chart open at all times. Tick history is built only while MT4 is running.
- Popular settings are 33, 133 and 233 ticks; 133 is the most commonly used.
Time, tick, volume and range charts compared
Day trading charts can be based upon several different criteria, with the most popular being time, ticks (number of trades), volume (number of contracts), and price range. All four types of charts use the same market information (price, volume, etc.), but they display the information slightly differently.
| Chart type | A new bar forms when… | Best suited for |
|---|---|---|
| Time | A fixed time period ends (for example 1 minute) | General analysis, comparing sessions |
| Tick | A fixed number of trades (ticks) is completed | Scalping and active intraday trading |
| Volume | A fixed number of contracts trades | Markets with reliable exchange volume |
| Price range | Price moves a fixed distance | Filtering noise in sideways markets |
What are tick charts?
Charts based upon ticks make a new price bar (or candlestick, line, etc.) every time a specific number of trades are completed. Popular numbers of ticks are 33 ticks, 133 ticks, and 233 ticks, which are all short term timeframes. As tick based charts only make new bars when there have been enough trades, they adjust to the market, making bars less often when the market is moving slowly. Some day traders believe that this gives tick charts an advantage over time charts, but this really depends upon the trading system being used.
In spot forex, MT4 has no central exchange volume, so a “tick” is a price update from your broker’s feed rather than a reported trade. Two brokers can therefore produce slightly different tick charts for the same pair. Keep that in mind when you compare your charts with someone else’s.
How to set up tick charts in Metatrader 4: 5 tick bar example
- Download LogTickData and PostTickData mql4 codes
- Put the files inside the Metatrader 4 Experts\Indicators folder (written as c:Metatrader4ExpertsIndicator in the original post). In current MT4 builds, open MT4, click File > Open Data Folder and copy the files into MQL4\Indicators.
- Open MetaEditor and compile the files LogTickData.mq4 and PostTickData.mq4.
- Open Metatrader.
- Open a 1 min EURUSD chart.
- Put the LogTickData indicator on this “naked” M1 EURUSD chart (enable DLL). Wait for some time so that tick data will be collected and stored.
- Drag the PostTickData indicator into the same chart on the price window (enable DLL) and choose your own preferred ticks per bar on the inputs tab (5 if you wish a 5-tick bar chart), but 33, 133 and 233 are more random tick charts and 133 is the one used most commonly.
- Then open the offline chart !TickEURUSD, M5 (leave the time as is) through File > Open Offline. This chart will start to collect tick data and you will see bars start to form. Wait until sufficient bars have formed, and then add your favourite indicators.
Important notes
- Always leave the leading M1 chart open, don’t close it! There is one big disadvantage of this system: once you close MT, you must wait again while new data builds up to produce a new tick chart.
- The tick data starts from 1970s. On the offline chart the time axis is not meaningful for tick bars, so ignore the dates and read the bars by count.
- If the offline chart does not update, check that “Allow DLL imports” is enabled under Tools > Options > Expert Advisors and in the indicator properties.
EURUSD 1 min chart vs 5 tick chart
The two screenshots below show the same market on a 1 minute chart and on the offline 5 tick chart. Notice how the tick chart prints many more bars when activity is high and fewer bars when the market is quiet.


Limitations of tick charts in MT4
- No history: unlike time charts, you cannot download past tick bars. The chart starts empty and builds while MT4 runs.
- Broker-dependent ticks: the tick count depends on your broker’s price feed, so bar counts can differ between brokers.
- Restarts break the series: closing MT4 or losing the connection creates gaps in the tick data.
- Indicators that depend on time (session highs, time-based VWAP) behave differently on tick bars.
For more MetaTrader charting tricks, see how to plot any timeframe in MetaTrader using the Period Converter and importing intraday data from MetaTrader to AmiBroker. If you want tick charts in AmiBroker instead, read MetaTrader to AmiBroker tick charts using the DDE universal plugin, and for data quality issues read tick data vendors and the quality of tick datafeeds.
Frequently Asked Questions
Does MT4 have tick charts?
Not natively. MT4 only offers time-based timeframes from M1 to MN, so you need custom indicators such as LogTickData and PostTickData that build an offline tick chart.
What is the best tick chart setting for day trading?
There is no single best value. 33, 133 and 233 ticks are popular, and 133 is the most commonly used. Smaller values give more bars and more noise; larger values smooth the chart.
Is there a tick chart MT4 indicator?
Yes. The LogTickData and PostTickData pair used in this guide is the classic tick chart MT4 indicator combination: the first records ticks and the second draws them as N tick bars on an offline chart.
Why does my MT4 tick chart disappear after a restart?
The tick history is collected only while the M1 source chart is open and MT4 is running. When you close MT4, the indicator has to start building the tick data again.
Are tick charts better than time charts?
Tick charts adapt to activity, printing more bars when the market is busy and fewer when it is quiet. Whether that is better depends on your trading system; test both on the same strategy.
Learn by watching: free videos every week
Market Profile, order flow, Python, AI and OpenAlgo tutorials on YouTube.


rajendra sir
please help me
i want to convert mt4 indicators to mt5 but its showing me errors while compiling please can u help me for this
thnks in advance
rajendra sir
please give me ur mail id so that i can give u these indicators
my id is [email protected]
thanks
send it to [email protected]
Hello
I did everything but the price is not moving. Any idea?
Here is my chart
Thanks,
Travis
rajendra sir
please help me i want to metatrader 4 mcx live chart platform
Rajendra sir,
i want to metatrader 5 mcx live charts. please sir give me your contact number also.
hey i am allready using tickbarchart in MT4, so log and posttickdata.mq4, can you help me to modify these? So my real broker instruments name EURUSD. (with an extra dot behind) and the .hst file cannot create because in windows no possibility to make any kind of filename eurusd..hst. so if you can, please help me in this case…thanks a lot.best regards from Hungary.
Sir,
I want real time mcx & nse realtime charts on MT4 or MT5 with datafeed from Sharekhan Trade Tiger or Odin.
Secondly is there any way to convert MT4 indicators into AFLs
Thirdly ,is there any way we could connect out trading terminal such as odin to Amibroker/MT4 for Auto Trade.
Please Help….
Hi,
Post tick Data is not able to apply on the chart there is some error. It will show Error on the file open:Tick Data\EURUSD,CSV,#4103!.
Can MT4 Customer Indicators work on ODIN DIET Platform…
Please help me on this….
Vamsi,
It wont workin in ODIN Diet Platform. MT4 custom indicators will work only in MT4 platform. And Odin Diet doesnt supports custom indicators like how MT4 does.
how to open indian mcx commodity csv file from tradetiger in to metatrader 4
Downloaded this yesterday and must say I am impressed. Don’t know how the impact will be on my cpu and mt4 instance, maybe you can reply on that?
Any way, thanks for posting (creating?) this tickbar feature, it works great and is definitely one of the nicest mt4 add ons that I have seen since I started using mt4 four years ago!
Adding to that is that it’s working great, however my ea won’t read these offline charts. I had that in the past with some other offline charts (and some others not). Probably something in the code, will try to find it.
Now it is possible to add tick charts in the indicator window of MT4. Check RW Tick Chart indicator at http://www.rwtickchart.com
I don’t know why MetaQuotes doesn’t just include a tick bar option in their platforms. The most intuitive platform, in my opinion, is still Metatrader 4. I use it all the time, but the lack of tick bars is a real detriment. I’ve used the method described above before. It’s just not very practical for serious traders.
Hi Rajendren,
Do u have a good indicator to trade binery options in 1 m TF?
U may email me
regrds,
Jadish
Sri Lanka
Hi Jagdish,
Trading 1min timeframe is quite dangerous instead you can try with increasing your timeframe as the probability of winning in lower timeframe is quite lower and the risk associated is quite higher. Instead i would suggest you should try with 5min,10min or 15min max.
hi rajandran
i had installed mt4 and your tick chart indicator about a month ago and it was working fine. i reformatted my pc, and installed mt4 again and tried to compile “posttickdata” file but it gives me the following errors:
‘_Symbol’ – variable already defined PostTickData.mq4 31 8
‘_Period’ – variable already defined PostTickData.mq4 35 5
‘_Symbol’ – constant cannot be modified PostTickData.mq4 51 5
any ideas?
@Yan : Probably the new MT4 600 build is not allowing as they modified the mql4 programming a lot.
Hi Rajandran,
I think the problem could be related to mt4 build 600 which was released early February (unknowingly to me) which would explain why there would be problems and also why locations of files are a bit different.
Previous version was 509 I think and didn’t have these problems. But not sure why compiling would cause errors now…
What do you think?
coz the file paths has been changed now which requires change in mql4 coding stuff.
These is because _Symbol and _Period are predefined in MT4 Build 600. Find and replace all _Symbol and _Period with something else and then try to compile and it will work.
Thanks for the info
I changed
1. ” _Symbol” to “_symbol”
2. “_Price” to “_Price”
then you can compile without errors
it works
Thank you Niraj
Niraj,
any idea what to substitute? for _symbol and _period
it’s also busted for me
Hi all,
i was looking for for a tick chart for the MT4 platform. Hopefully someone made this !
But for me it’s still not working.
First of all i use the last version of MT4, so when i tried to compile i got an error. _Symbol and _Period are already defined. I fixed it by changing the name of the variable. SO now it compile.
But now i have a second error
When i drag the PostTickData to the chart
I get an error : Error on file open: TickData/EURJPY..csv, #5002
I read all the post and tried all the PostTickData version but still have a problem to install the tick chart.
It seems that the LogTickData is not creating the .csv file.
I created the TickData folder myself in the indicators folder.
But still not see any .csv file.
I suppose the error is coming from the LogTickData that is not creating the file.
I debug a little bit the code, but i’m not familiar with the mq4 language.
But it appear that the file handle always return -1 (means it cannot open or create the file) at the line 51 of the LogTickData.
Code:
handle = FileOpen(sFileName, FILE_READ|FILE_WRITE|FILE_CSV, “;”);
I tried by creating the file manually without success. It still cannot open the file. I tried by changing the permission of the Metatrader 4 platform and the permission of the metaEditor.
Still not working.
Anyone already encounter this error ?
I just made fix for build 600
You might need to do two things
1. Folder might be read only.. So you need to change it.
file -> data folder and Right Click MQL4 folder, uncheck “read only.”(it seems no change after you checking change but it does.. Don’t worry..)
2. Change source code of “PostTickData.mq4”
you need to change code for _Period and _Symbol just as described above.
find line “FileOpenHistory” and add “FILE_SHARE_READ” as following:
HistoryHandle = FileOpenHistory( file_name, FILE_BIN | FILE_WRITE| FILE_SHARE_READ);
Many thanks Kats for suggesting the inclusion of “FILE_SHARE_READ”” in the definition of HistoryHandle in PostTickData.
Without it the .HST file remains locked and MT4 Version 4.00 Build 890 (25 Sept 2015, and presumably 600+ versions) will not allow the offline chart to be opened with File>Open Offline.
Forgive my bad manners–I forgot to thank Rajandran for the original code and remarkably clear instructions
Hi!
Everything is working fine – thx…but I have a “Little” problem. My EA is not able to trade or to read the values of the BB (for example) in the offline chart ……..is it possible, to run a EA in an offline chart? ….. Test = iBands(Symbol(),Period(),20,2.0,0,PRICE_CLOSE,1,0); doesn’t work. It seems to be, that the code in start() will never be activ……
hola. el problema de compilacion del indicador posttickdata se puede solucionar renombrando las variables que generan conflicto, estas variables son _Symbol y _Period.
Simplemente hay que buscar y reemplazar en todo el codigo donde se encuentran las palabras _Symbol y _Period y reemplazarlas por paralabras como por ejemplo S_ymbol y P_eridod
un saludo!
Hello Rajendran sir,
I am using your MCX supertrend indicator past 2 years. really nice website.
My question is – I am trading MCX in Odin Diet 10.0.2.0. and I am using indicators in Xforex MT4 build 765 (demo account) for reference,
I want to connect Odin real time data to MT4 by DDE. Please guide me sir.
Hi,
You cannot connect odin real time to MT4. As MT4 act as DDE servers MT4 can pass data to any external DDE application which is similar to ODIN. However MT4 is not designed to receive DDE data.
Hello,
Once the Tick Charts installed on MT4, is it possible to attach an EA to place automated trades based on Tick Charts? Just like on normal MT4 charts?
Hi every body
I need to convert tick chart to 1 second chart and check the 1 second chart live
Can any body help me and send for me the indicators ?
Thanks a lot
Hi,
How to open the !TickEURUSD, M5
I think ODIN -> MT4 is possible but it is not as straightforward as clicking on a few menu options etc. I am working on it but provided I get this one working.
How come you say experts/indicator directory? In my MQL 4 sub diretory, there is an Experts Directory and then an Indicator directory (along with others like include, scripts etc).. there is nothing like and Experts/Indicators directory (i.e an indicator directory under the expert directory).. Are you implying that we create such a subfolder and MT4 would recognize it? Or are you implying that it is something that exists in newer versions of MT4 or is it just a typo? Please clarify.
Regards
Hello Rajandran R, good post…
have you done the same on MQL5?
Thanks…
hallo sir
i want learn building auto trading software mt4 to odine
can you give me sagetion who will teach me. give details
thank you
sikandar