Fellow Squad Members,
I always wanted to see tickcharts for forex pairs even if the general explanation of why we don't have is that 'hey, this is an OTC market, you won't see all ticks even nearly'. Using tick data can result in different charts from broker to broker probably depending on LP and the dealing desk operations but they won't be that different for sure. They tend to be representative sample at least that seems to be good enough to make decisions upon.
So I've made a tool for MT4 that has some significant advantages:
+ It's an indicator that registers every tick and write data into a CSV file in folder {MetaTrader4 folder}/experts/files/.
+ It has silent mode so you can use it only for registering ticks.
+ It draws not only 1-tick chart but makes whichever tick aggregation you need + without restarting drawing candles from the very beginning. (Tick_count is the external variable you need to set.)
+ Having compiled OHLC values it can show candlestick, bar and line charts.
+ It works fine in test mode also - however it deletes tick register CSV file in that case (that is in {MetaTrader4 folder}/tester/files then).
+ The code is practically independent of MT4 platform changes so supposedly it is going to work fine for a while.
Be aware of:
+ For drawing I needed to use a totally different scale that you see on the right hand side otherwise. It means also that you can't use indicators with this chart.
+ Since graphical objects are printed on the top of the chart it's better to make all other chart parts fade out if not totally erease. This is why I give a template file with the MQL. This tickchart.tpl should go to {MetaTrader4 folder}/templates folder.
Installation and starting:
Download source code from here:
OPTIONAL: Download template file from here (it fades out the background chart):
This is an indicator code so you need to copy it to {MetaTrader4 folder}/experts/indicators folder and then start the trading platform (or close and restart if it was open). The tool will appear on Navigator panel (open from View menu) among Custom Indicators as FPA=TrailingStop so just drag over your chart, or select Tickchart template from template list.
Settings and Parameters:
You can open Inputs tab after starting the indicator by right clicking on the chart and selecting Indicators List, then FPA=TickChartDraw and then clicking Edit button.
Parameter: Tick_Count
Valid values: positive decimal numbers
Function: Specifies how many ticks should be counted to form a candle.
Parameter: Show_chart__in_add_to_reg_ticks
Valid values: true or false
Function: For normal tickchart drawing set it to true but if you use false instead you won't see the chart itself but you'll find all ticks registered in a CSV file (named for example as FPA_ticks_EURUSD.csv) in {MetaTrader4 folder}/experts/files folder.
Parameter: Bar_1___Candlestick_2___Line_3
Valid values: 1, 2 or 3
Function: Selection of chart type. (Actually you can enter whatever integer, remainder will be processed.)
Parameter: Show_old_data_with_separators
Valid values: true or false
Function: Yup, it's trickier. There is a hidden parameter (you can find in the source code as 'restart_candles_time_gap') that is set to 300 by default. It means if between two candles more than this time in seconds elapses (so 5 minutes in this case) indicator restarts candle aggreagation supposing that meanwhile trading platform (or at least the chart) was down. By default it is set to false that is no older candles will be shown than when this happened last time. Otherwise (with using true) dashed vertical lines will show last interruptions that took longer than 5 minutes.
You can participate:
Tell me and your fellow Squad Members how you like it.
Tell me and your fellow Squad Members how could it be better.
Tell me and your fellow Squad Members if you have any problem while installing or using it.
Who wants to enter the Laboratory:
Right click on Navigator panel/Custom Indicators/FPA=TickChartDraw and select Modify. MetaEditor opens up showing the full source code I've written for you.
On the first screen you find input parameters and you can change default values if you wish.
After modifying the code press F5 or Compile button on the top. If it writes "0 error(s),..." on the bottom, you have your own new version and you can start using it after going back to MT4 terminal.
Looking forward to hearing your feedback,
Peter
I always wanted to see tickcharts for forex pairs even if the general explanation of why we don't have is that 'hey, this is an OTC market, you won't see all ticks even nearly'. Using tick data can result in different charts from broker to broker probably depending on LP and the dealing desk operations but they won't be that different for sure. They tend to be representative sample at least that seems to be good enough to make decisions upon.
So I've made a tool for MT4 that has some significant advantages:
+ It's an indicator that registers every tick and write data into a CSV file in folder {MetaTrader4 folder}/experts/files/.
+ It has silent mode so you can use it only for registering ticks.
+ It draws not only 1-tick chart but makes whichever tick aggregation you need + without restarting drawing candles from the very beginning. (Tick_count is the external variable you need to set.)
+ Having compiled OHLC values it can show candlestick, bar and line charts.
+ It works fine in test mode also - however it deletes tick register CSV file in that case (that is in {MetaTrader4 folder}/tester/files then).
+ The code is practically independent of MT4 platform changes so supposedly it is going to work fine for a while.
Be aware of:
+ For drawing I needed to use a totally different scale that you see on the right hand side otherwise. It means also that you can't use indicators with this chart.
+ Since graphical objects are printed on the top of the chart it's better to make all other chart parts fade out if not totally erease. This is why I give a template file with the MQL. This tickchart.tpl should go to {MetaTrader4 folder}/templates folder.
Installation and starting:
Download source code from here:
OPTIONAL: Download template file from here (it fades out the background chart):
This is an indicator code so you need to copy it to {MetaTrader4 folder}/experts/indicators folder and then start the trading platform (or close and restart if it was open). The tool will appear on Navigator panel (open from View menu) among Custom Indicators as FPA=TrailingStop so just drag over your chart, or select Tickchart template from template list.
Settings and Parameters:
You can open Inputs tab after starting the indicator by right clicking on the chart and selecting Indicators List, then FPA=TickChartDraw and then clicking Edit button.
Parameter: Tick_Count
Valid values: positive decimal numbers
Function: Specifies how many ticks should be counted to form a candle.
Parameter: Show_chart__in_add_to_reg_ticks
Valid values: true or false
Function: For normal tickchart drawing set it to true but if you use false instead you won't see the chart itself but you'll find all ticks registered in a CSV file (named for example as FPA_ticks_EURUSD.csv) in {MetaTrader4 folder}/experts/files folder.
Parameter: Bar_1___Candlestick_2___Line_3
Valid values: 1, 2 or 3
Function: Selection of chart type. (Actually you can enter whatever integer, remainder will be processed.)
Parameter: Show_old_data_with_separators
Valid values: true or false
Function: Yup, it's trickier. There is a hidden parameter (you can find in the source code as 'restart_candles_time_gap') that is set to 300 by default. It means if between two candles more than this time in seconds elapses (so 5 minutes in this case) indicator restarts candle aggreagation supposing that meanwhile trading platform (or at least the chart) was down. By default it is set to false that is no older candles will be shown than when this happened last time. Otherwise (with using true) dashed vertical lines will show last interruptions that took longer than 5 minutes.
You can participate:
Tell me and your fellow Squad Members how you like it.
Tell me and your fellow Squad Members how could it be better.
Tell me and your fellow Squad Members if you have any problem while installing or using it.
Who wants to enter the Laboratory:
Right click on Navigator panel/Custom Indicators/FPA=TickChartDraw and select Modify. MetaEditor opens up showing the full source code I've written for you.
On the first screen you find input parameters and you can change default values if you wish.
After modifying the code press F5 or Compile button on the top. If it writes "0 error(s),..." on the bottom, you have your own new version and you can start using it after going back to MT4 terminal.
Looking forward to hearing your feedback,
Peter
Last edited by a moderator: