FPI - Fractional Product Inefficiency: The Impeccable Hedge

NeoTicker indicators

Moderator: moderators

User avatar
Nicholishen
rank: 50+ posts
rank: 50+ posts
Posts: 52
Joined: Thu Oct 26, 2006 8:44 am
Reputation: 0
Real name: Nick
Gender: Male

Postby Nicholishen » Tue Nov 07, 2006 6:58 pm

michal.kreslik wrote:The problem with MT4 data is that the spread is artificial. It doesn't reflect the true interbank spread, so its applicability is diminished.

Michal

I may be misunderstanding you here, but in reality how many of us have the Prime Broker realtionships, $5M, and our own liquidity provider... because that's what I understand it takes to get 'true interbank pricing'. Is there a RETAIL broker out there that provides true interbank pricing and spreads? I'm sorry for littering the thread, but what am I missing?

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

User avatar
michal.kreslik
rank: 1000+ posts
rank: 1000+ posts
Posts: 1047
Joined: Sat May 13, 2006 2:40 am
Reputation: 36
Location: Monte Carlo, Monaco
Real name: Michal Kreslik
Gender: Male

Postby michal.kreslik » Tue Nov 07, 2006 7:07 pm

Nicholishen wrote:I may be misunderstanding you here, but in reality how many of us have the Prime Broker realtionships, $5M, and our own liquidity provider... because that's what I understand it takes to get 'true interbank pricing'. Is there a RETAIL broker out there that provides true interbank pricing and spreads? I'm sorry for littering the thread, but what am I missing?


Yes, there is :)

http://www.efxgroup.com/

And they connect to NeoTicker, too.

Michal

User avatar
eagles
rank: <50 posts
rank: <50 posts
Posts: 28
Joined: Mon May 22, 2006 6:38 pm
Reputation: 0
Location: Plano, TX
Gender: Male

Postby eagles » Tue Nov 07, 2006 7:30 pm

Here is an expert to provide bid-ask prices as the ticks arrive.

It is a modification of the work done by Andrey Khatimlyanskyy on www.mql4.com where he explained data storage.

There are 4 files:
log2.mq4 & log2.ex4
log ticks.mq4 & log ticks.ex4

Place the log2 files in the \experts\include folder.
Place the log ticks files in the \experts folder.

Add the log ticks expert to the chart with the symbol you want to collect bid-ask data.

There is an option for local time or broker time in the expert. TimeisLocal = true gives local time, =false gives broker time. (In IBFX broker time is GMT).


The expert will generate one file per calendar day. You will have to combine files for multiple days, but it offers some protection from creating a HUGE file. If you want, you can modify the log2.mq4 to adjust this for a single file or multiple days.

The resulting text file is located in the \experts\files folder.

The file is a text file with the name in the format
"Acct No Tick-Bid-Ask--date.txt"
Example: 1261643 Tick-Bid-Ask--2006.11.07.txt

The data is csv in the format shown below:

Time,Bid,Ask
13:07:52,1.9092,1.9097
13:07:52,1.9092,1.9096
13:07:53,1.9091,1.9096
13:07:59,1.9092,1.9096
13:07:59,1.9092,1.9097
13:08:00,1.9093,1.9097
13:08:09,1.9092,1.9097
13:08:12,1.9092,1.9096
Time,Bid,Ask
19:08:22,1.9092,1.9096
19:08:22,1.9092,1.9097
19:08:23,1.9092,1.9096
19:08:28,1.9091,1.9096
19:08:32,1.9090,1.9095

This is a copy & paste from a single text file where I changed from local time to broker time after the expert started.

Note that each time the expert restarts, i.e. changing inputs, changing time frames, opening & closing metatrader, and probably other activities, the expert is restarted and the header line is put in the text file (Time,Bid,Ask).

If you want to collect data, the best choice is to set this and let it run continuosly for the desired time. Or, you will need to ensure you clean out these headers before using the data. I suspect, but haven't confirmed, that you could miss data points when you restarted the expert.

Hope this helps, and thanks to Andrey for the initial concept and code.

P.S. to Gert... Cap'n Jack works, but eagles is faster to type.
Attachments
tick-bid-ask logging.zip
Place log2 files in expertsinclude folder
Place log ticks files in experts folder

Add log ticks expert to chart with symbol that you want bid-ask prices collected.
(4.85 KiB) Downloaded 285 times

User avatar
Nicholishen
rank: 50+ posts
rank: 50+ posts
Posts: 52
Joined: Thu Oct 26, 2006 8:44 am
Reputation: 0
Real name: Nick
Gender: Male

Postby Nicholishen » Tue Nov 07, 2006 7:52 pm

eagles wrote:Here is an expert to provide bid-ask prices as the ticks arrive.

It is a modification of the work done by Andrey Khatimlyanskyy on www.mql4.com where he explained data storage.

There are 4 files:
log2.mq4 & log2.ex4
log ticks.mq4 & log ticks.ex4

Place the log2 files in the \experts\include folder.
Place the log ticks files in the \experts folder.

Add the log ticks expert to the chart with the symbol you want to collect bid-ask data.

There is an option for local time or broker time in the expert. TimeisLocal = true gives local time, =false gives broker time. (In IBFX broker time is GMT).


The expert will generate one file per calendar day. You will have to combine files for multiple days, but it offers some protection from creating a HUGE file. If you want, you can modify the log2.mq4 to adjust this for a single file or multiple days.

The resulting text file is located in the \experts\files folder.

The file is a text file with the name in the format
"Acct No Tick-Bid-Ask--date.txt"
Example: 1261643 Tick-Bid-Ask--2006.11.07.txt

The data is csv in the format shown below:

Time,Bid,Ask
13:07:52,1.9092,1.9097
13:07:52,1.9092,1.9096
13:07:53,1.9091,1.9096
13:07:59,1.9092,1.9096
13:07:59,1.9092,1.9097
13:08:00,1.9093,1.9097
13:08:09,1.9092,1.9097
13:08:12,1.9092,1.9096
Time,Bid,Ask
19:08:22,1.9092,1.9096
19:08:22,1.9092,1.9097
19:08:23,1.9092,1.9096
19:08:28,1.9091,1.9096
19:08:32,1.9090,1.9095

This is a copy & paste from a single text file where I changed from local time to broker time after the expert started.

Note that each time the expert restarts, i.e. changing inputs, changing time frames, opening & closing metatrader, and probably other activities, the expert is restarted and the header line is put in the text file (Time,Bid,Ask).

If you want to collect data, the best choice is to set this and let it run continuosly for the desired time. Or, you will need to ensure you clean out these headers before using the data. I suspect, but haven't confirmed, that you could miss data points when you restarted the expert.

Hope this helps, and thanks to Andrey for the initial concept and code.

P.S. to Gert... Cap'n Jack works, but eagles is faster to type.


Hi eagles,

Can you check out the tick logger that I posted a few posts back? I think that it may be advantageous because it logs all ticks on a per second basis. It may be more usefull to this cause because a backtester would simply go through the data and matchup the ticks, second by second, regardless of whether or not the tick has changed for that particular currency pair. ...Not to meantion that it will log all currency pairs when running on one chart only. =D

Harm
rank: <50 posts
rank: <50 posts
Posts: 15
Joined: Sat Oct 28, 2006 7:35 pm
Reputation: 0
Gender: None specified

Postby Harm » Tue Nov 07, 2006 7:57 pm

egles,

Thanks, that is exactly the kind of thing I was looking to create myself.

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

User avatar
eagles
rank: <50 posts
rank: <50 posts
Posts: 28
Joined: Mon May 22, 2006 6:38 pm
Reputation: 0
Location: Plano, TX
Gender: Male

Postby eagles » Tue Nov 07, 2006 9:29 pm

Nicholishen,

I must have missed your post as I was catching up on posts. :oops:

I looked at your data files, and it doesn't appear to collect data for every second. There are 'duplicate' data points, where the prices are the same for a time sequence of a few seconds, but there are also time gaps of a few seconds.

Oh well, now there are 2 options for anyone that is interested.

User avatar
Nicholishen
rank: 50+ posts
rank: 50+ posts
Posts: 52
Joined: Thu Oct 26, 2006 8:44 am
Reputation: 0
Real name: Nick
Gender: Male

Postby Nicholishen » Tue Nov 07, 2006 9:39 pm

eagles wrote:Nicholishen,

I must have missed your post as I was catching up on posts. :oops:

I looked at your data files, and it doesn't appear to collect data for every second. There are 'duplicate' data points, where the prices are the same for a time sequence of a few seconds, but there are also time gaps of a few seconds.

Oh well, now there are 2 options for anyone that is interested.


The posted tick log updates only once per second as long as there is at least one tick update that second. If there are no updated ticks on any pairs, the logged data for that second is skipped. Please find (below) the updated tick logger which updates all pairs once per second per the criteria described above, and tick logger_only new ticks that logs all pairs from one chart, but only updates the pair log when new tick data has been received.
Attachments
Tick Logger_only new ticks.rar
(916 Bytes) Downloaded 235 times
Tick Log.rar
(908 Bytes) Downloaded 239 times

User avatar
Nicholishen
rank: 50+ posts
rank: 50+ posts
Posts: 52
Joined: Thu Oct 26, 2006 8:44 am
Reputation: 0
Real name: Nick
Gender: Male

Postby Nicholishen » Wed Nov 08, 2006 1:45 am

i will write a script to logg ticks please provide me with a sample of how you would like it formatted.

smotty1
rank: <50 posts
rank: <50 posts
Posts: 4
Joined: Mon Nov 06, 2006 4:21 pm
Reputation: 0
Gender: None specified

Postby smotty1 » Wed Nov 08, 2006 9:44 am

Michael I hope you can help me answer this?

I am streaming tick data in from Interactive Brokers to calculate the FPI
i am using a sell sell buy ring, so the data i am using to calculate the FPI is bid bid ask price. When the FPI is calculated it ranges from 1 or less, but never above.

If i calculate the FPI on the same currencies using buy buy sell or ask, ask, bid, the FPI is always greater than 1.

I am sure i am doing something wrong .... please help

User avatar
michal.kreslik
rank: 1000+ posts
rank: 1000+ posts
Posts: 1047
Joined: Sat May 13, 2006 2:40 am
Reputation: 36
Location: Monte Carlo, Monaco
Real name: Michal Kreslik
Gender: Male

Postby michal.kreslik » Wed Nov 08, 2006 10:09 am

smotty1 wrote:Michael I hope you can help me answer this?

I am streaming tick data in from Interactive Brokers to calculate the FPI
i am using a sell sell buy ring, so the data i am using to calculate the FPI is bid bid ask price. When the FPI is calculated it ranges from 1 or less, but never above.

If i calculate the FPI on the same currencies using buy buy sell or ask, ask, bid, the FPI is always greater than 1.

I am sure i am doing something wrong .... please help


The answer is in this post:

http://kreslik.com/forums/viewtopic.php?p=2636#2636

Michal

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.


Return to “NeoTicker indicators”