Second interval forex data

 

Hi forum,

Is there any way of downloading second by second currency data for multiple currency pairs? I can see minute intervals as the smallest timeframe but I’m interested in looking at OHLCV figures on a second by second basis.

If there is no way of downloading, is there any way of capturing and storing this myself? I’m new to MetaTrader 4 so I also don’t know where anything is yet.

TIA for your help and patience,

CPerry.

 
CPerry:

Hi forum,

Is there any way of downloading second by second currency data for multiple currency pairs? I can see minute intervals as the smallest timeframe but I’m interested in looking at OHLCV figures on a second by second basis.

If there is no way of downloading, is there any way of capturing and storing this myself? I’m new to MetaTrader 4 so I also don’t know where anything is yet.

TIA for your help and patience,

CPerry.

You can build custom symbols for that you use tick data to create 1 bars.

Search for Cutsom Symbols: https://www.mql5.com/en/search#!keyword=Custom%20symbols

 
CPerry: Is there any way of downloading second by second currency data for multiple currency pairs? I can see minute intervals as the smallest timeframe but I’m interested in looking at OHLCV figures on a second by second basis. If there is no way of downloading, is there any way of capturing and storing this myself? I’m new to MetaTrader 4 so I also don’t know where anything is yet. TIA for your help and patience,CPerry.

It seems your question is about MT4 and not MT5, so in that case it is not normally possible because MT4 does not maintain any database of historical tick data.

If you need that, then you will have to captura the data yourself in real-time and generate Offline Charts in second by second format.

There may be existing tools for that in the Market or Codebase, so run a search. Another option is to code it yourself or hire someone in the Freelance section to code it for you.

 
@Carl Schreiber #: You can build custom symbols for that you use tick data to create 1 bars. Search for Cutsom Symbols

Unfortunately the OP is asking about MT4 and not MT5 — "I’m new to MetaTrader 4"

So, he has to generate MT4 Offline Charts instead of MT5 Custom Symbols.

 

Thank you both! I have now downloaded MT5 and read the first few articles in the search list you provided. It is starting to make sense so I'm going to have a go at building custom symbols for each of the currency pairs I want to examine tomorrow. I have plenty of other questions but I'm going to go and see what I can figure out for myself before reporting back here.


Cheers,

CPerry.

 
CPerry #: Thank you both! I have now downloaded MT5 and read the first few articles in the search list you provided. It is starting to make sense so I'm going to have a go at building custom symbols for each of the currency pairs I want to examine tomorrow. I have plenty of other questions but I'm going to go and see what I can figure out for myself before reporting back here.
Since you have now moved to MT5, remember to place your future questions in the other sections of the forum and not in this MT4 section any more.
 

Apologies @Fernando Carreiro, I hadn’t seen this message. I’m still getting used to navigating this forum.

Upon further research, I am using IG as my broker and they have not yet transitioned from MT4 to MT5. I was hoping to incorporate bid/ask prices into my analysis but this does not now seem possible.

Am I best to use MT5 custom symbols to export one second data to a spreadsheet and then artificially create a spread? IG themselves state their average spread (00:00 – 21:00) is 1.4. Therefore, could I take the closing price from the exported data and -0.7 for the bid price and + 0.7 for the ask price, on each row, to get a reasonable analysis?

Can the spread ever be more favourable to one side, i.e. instead of -0.7 and + 0.7 to create a 1.4 spread, could it ever be -0.4 and + 1.0 to create 1.4 or is it always equal on both sides?

Obviously, I am looking to trade GBP/USD at a relatively high frequency with lots of smaller orders. Please tell me that MT4 will let me use S1 ticks once I’ve done my back-testing in live mode and also in strategy tester.

Thank you as always,

CPerry.

 
CPerry #: Apologies @Fernando Carreiro, I hadn’t seen this message. I’m still getting used to navigating this forum. Upon further research, I am using *** as my broker and they have not yet transitioned from MT4 to MT5. I was hoping to incorporate bid/ask prices into my analysis but this does not now seem possible. Am I best to use MT5 custom symbols to export one second data to a spreadsheet and then artificially create a spread? IG themselves state their average spread (00:00 – 21:00) is 1.4. Therefore, could I take the closing price from the exported data and -0.7 for the bid price and + 0.7 for the ask price, on each row, to get a reasonable analysis? Can the spread ever be more favourable to one side, i.e. instead of -0.7 and + 0.7 to create a 1.4 spread, could it ever be -0.4 and + 1.0 to create 1.4 or is it always equal on both sides? Obviously, I am looking to trade GBP/USD at a relatively high frequency with lots of smaller orders. Please tell me that MT4 will let me use S1 ticks once I’ve done my back-testing in live mode and also in strategy tester.

When I first started, they were my first broker (but only for a couple of months, before I moved on).

Since you are still paper trading and not actually trading real money for now, there is no reason for you to only use that broker’s data. Select any other broker offering MT5 or downloadable tick data, and use that data in your spreadsheet calculations. You can also have the spreadsheet work with a padded spread of your choosing so that you can analyse the impact of a higher or lower spread will have on your strategy’s resilience and profitability.

Please note that even if you generate Offline Charts for MT4, they will not have any spread data incorporated. All charts are bid prices only.

When testing EA’s in MT4, all ticks are “virtual” and not real and the spread is fixed at a user selectable amount in points. In order to test with real ticks (sourced from yet another broker), you use 3rd party tools, but only the most expensive of those tools allows for using floating spread instead of fixed spread.

So, I would highly recommend you find another broker that offers MT5 instead. There are other reputable UK regulated brokers that offer it.

 

Hi @Fernando Carreiro,

Hmmmm, I’ll have a look around tomorrow. I do like the idea of adding artificial spread for, as you said, resilience testing of my strategy ideas.

Are spreads even on both sides of the book? Always?

If I find something I find appealing to transition to live mode with, does MT4 allow me to trade at a one tick interval and strategy test one a one tick timeframe?

CPerry.

 
CPerry #: Hi @Fernando Carreiro, Hmmmm, I’ll have a look around tomorrow. I do like the idea of adding artificial spread for, as you said, resilience testing of my strategy ideas. Are spreads even on both sides of the book? Always?

There is ALWAYS spread in Forex trading, and even if a broker offers zero spread, they then charge a commission which in terms of transaction costs can easily be represented as a spread, which will amount to the same thing in the end. And many times they have both spread and commission.

Forum on trading, automated trading systems and testing trading strategies

Question about Tester Commisions and Swaps

Fernando Carreiro, 2017.01.12 23:25

Commissions can be represented as an equivalent value in pips yes, but not swaps as that is dependent on how long the order remains open and if it is hit by the triple swap day or not.

Here is an example (but will differ depending on some factors, for which you will have to change depending on your case):

The number of Pips that your commission ($ per million) represents in the case of GBP/USD and a USD Account Balance can be calculated as follows:

Pip Equivalent = Currency Price * Commission Rate * 2 Operations / 100

For example, if your GBP/USD Price is 1.62012 and your commission is $35 per million, then
Pip Equivalent = 1.62012 * 35 * 2 / 100 = 1.134084 ~ 1.2 pips (after ceiling adjustment)

If your average spread is 0.94 pips and commission is 1.2 pips, then total cost is 2.14 pips average.

EDIT: More details:
The "100" has nothing to do with percentage but rather the resultant value after factoring Contract Size and Pip Value for a Standard Lot of volume.

Here is the correct calculation in detail:
Contract Size = 100000 (Standard Lot Contract Size)
Pip Value = $10.00 (for Standard Lot of ???/USD and USD Account Balance)
Currency Price = 1.62012 (example for GBP/USD)
Value = Currency Price x Contract Size = $162012.00
Turnover = Value x 2 (open & close) = $324024.00
Commission Value = $35.00
Commission Scale = $1000000.00 (Million $)
Commission Rate = Commission Value / Commission Scale = 0.000035
Commission per Trade = Turnover x Commission Rate = $11.34084
Commission in Pips = Commission per Trade / Pip Value = 1.134084 pips

Thus the resultant simplified calculation is as follows:
Commission in Pips = Currency Price * Commission Value * 2 / 100
Commission in Pips = Currency Price * Commission Value / 50

EDIT2:
However, please note that this is an approximation, as we are using the same Currency Price for both the Open and Close of the Trade. To be exact, we would have to calculate separate commissions for the opening price and closing price, but the resulting difference from the above calculation is negligible. But if you wish, just use the average price between the opening and closing prices, in the calculation, for a better approximation.
Please note that this is only an example and depends on how commission is defined by your broker and in what currency it is expressed.

EDIT: Do a search as well. I found the following:



 
CPerry #: If I find something I find appealing to transition to live mode with, does MT4 allow me to trade at a one tick interval and strategy test one a one tick timeframe?

As explained before, the strategy tester on MT4 does not support real tick data, unless you use 3rd party tools with 3rd party tick data.

But you are currently paper trading and transitioning to live manual trading, so the strategy tester is of no use to you until you have a working Expert Advisor (EA) of your strategy.

For live manual trading however, there is live tick chart.

The situation for now, is that you require historical tick data to use in your spreadsheet paper trading, and MT4 can't offer you that.

Reason: