Tick-level timeframe, testing

 

Hi,


I started learning about several different scalping systems. Some people are using M1, some M5. Why is there so little information about using intra-M1 changes on the tick level?


I started gathering each tick and saving them into CSV files. They give some useful information and may be great for ultra early buy/sell signals. I even created some simple EA that trades based on last 3-4 ticks (eg if rising - open sell). I didn't make a lot of profit of course, but this approach looks promising - if tuned to filter opening too many positions.


Anyone using this kind of method? Is that successful? The biggest challenge for me right now is testing. Will backtester be any useful with testing when data MUST be provided with tick-level granularity?


Thanks for any thoughts :)

 
allerune:

Hi,


I started learning about several different scalping systems. Some people are using M1, some M5. Why is there so little information about using intra-M1 changes on the tick level?


I started gathering each tick and saving them into CSV files. They give some useful information and may be great for ultra early buy/sell signals. I even created some simple EA that trades based on last 3-4 ticks (eg if rising - open sell). I didn't make a lot of profit of course, but this approach looks promising - if tuned to filter opening too many positions.


Anyone using this kind of method? Is that successful? The biggest challenge for me right now is testing. Will backtester be any useful with testing when data MUST be provided with tick-level granularity?


Thanks for any thoughts :)


It's not posible to backtest EA's that depend on tick level granularity in MT4 (imposible after ver. 208. In older vesions it was posible, trough a bit tricky). The ticks in "every tick"-mode are just a guesstimate (as you probaly know).


That sade, I do use some "mickro"-trading on ticklevel data in every EA that I'v built to fine turn the entry point (but not for regular shalping, and not while backtesting).


Search for "recalculate button" her or on ForexFactory/TSD and you should find everyting about it.


/LV

 

Hello allerune


"Why is there so little information about using intra-M1 changes on the tick level?"

Perhaps due to the 'hard to get a handle on it' mindset. Who knows. You are on a voyage of discovery... for you! also, I've never come across any that want to talk about tick level data flows.

My latest experience using tester and ticks is that of coding in the EA, the usual newBar detection stuff and additionally, have added a tick counter which increments each start() entry and gets reset each newBar. (of course, I do not know if each and every tick has been seen - there is no warranty that an EA will see all ticks... But that's not worth the effort to get tangled up in such stuff imho.

The tick counter is a global and so available to all code in EA. I did this because newBar forming movements can be, as you've discovered, random and at times, much less so.

The strategies being tested like some current bar 'build time' before betting the house :/

The tick counter allows for an any tick count 'build time' descretion... iow, strategies are flexible and can just hang around for more ticks and if no joy, well... always another bar comming along!


Tester is working on dead data and tick-modeling. Forwards test is best. I've micro account so not that big an issue if always use 0.01lots. But even then, can hurt, so use sparingly for testing.

General concensus is always forward testing. Live ideal and demo next best - and cheaper too!


You are hinting at what I call Price Prognostication and actually, I would sell the family farm to become more in-tune with the rhythm of the price data flow.


I have, in the past achieved >85% manual trading on clean chart with just price. But was 5yrs ago and nearly killed me -lol.

You see... is like Watching Paint Dry! and I finally called it a day cuz lost the knack/gift/whatever and could no longer do the prognostication stuff. But I always think about it and as the saying goes once given, never forgotten :)


My ears are surely open to whatever you observe in this area :)


Best Regards


edit

LV mentions the MT build. Is on forum about this issue. Modelling quality

 
LastViking:


It's not posible to backtest EA's that depend on tick level granularity in MT4 (imposible after ver. 208. In older vesions it was posible, trough a bit tricky). The ticks in "every tick"-mode are just a guesstimate (as you probaly know).


That sade, I do use some "mickro"-trading on ticklevel data in every EA that I'v built to fine turn the entry point (but not for regular shalping, and not while backtesting).


Search for "recalculate button" her or on ForexFactory/TSD and you should find everyting about it.


/LV


Thanks for that, I can see where the problem is. I just can't understand why this very useful option had been removed from the MetaTrader software. I hope it would return with MT5.


Apart from technical problems, do you have any suggestions on the "micro-trading" strategy?

 
allerune wrote >>

Thanks for that, I can see where the problem is. I just can't understand why this very useful option had been removed from the MetaTrader software. I hope it would return with MT5.

Apart from technical problems, do you have any suggestions on the "micro-trading" strategy?

Familiar with the MarketWatch window <Ctrl-M> and the Tick Chart ?

 
fbj:

Hello allerune


"Why is there so little information about using intra-M1 changes on the tick level?"

Perhaps due to the 'hard to get a handle on it' mindset. Who knows. You are on a voyage of discovery... for you! also, I've never come across any that want to talk about tick level data flows.

Thanks fbj,


If this is something new, I can see that my IT background can give me the edge. Developing my own micro-optimizer in .NET or JAVA could be an option but I'm thinking about something easier.


What about tricking MT into loading a fake set of data. Fake, meaning, every tick gathered from live system would be converted as if it was M1:

Tick data:

1503;EURUSD;2009.08.10 00:02:08;1.4181
1504;EURUSD;2009.08.10 00:02:09;1.4182
1505;EURUSD;2009.08.10 00:02:11;1.4180
1506;EURUSD;2009.08.10 00:02:20;1.4182
1507;EURUSD;2009.08.10 00:02:20;1.4181
1508;EURUSD;2009.08.10 00:02:25;1.4182
1509;EURUSD;2009.08.10 00:02:26;1.4183

Converted to M1

1503;EURUSD;2009.01.01 00:01:00;1.4181;1.4181;1.4181;1.4181
1504;EURUSD;2009.01.01 00:02:00;1.4182;1.4182;1.4182;1.4182
1505;EURUSD;2009.01.01 00:03:00;1.4180;1.4180;1.4180;1.4180
1506;EURUSD;2009.01.01 00:04:00;1.4182;1.4182;1.4182;1.4182
1507;EURUSD;2009.01.01 00:05:00;1.4181;1.4181;1.4181;1.4181
1508;EURUSD;2009.01.01 00:06:00;1.4182;1.4182;1.4182;1.4182
1509;EURUSD;2009.01.01 00:07:00;1.4183;1.4183;1.4183;1.4183


This way we get flat candles, wrong timeframe, but the tests may give realistic results.

 
fbj:

Familiar with the MarketWatch window <Ctrl-M> and the Tick Chart ?

yep ;)


but that doesn't give too much information.


I have, in the past achieved >85% manual trading on clean chart with just price. But was 5yrs ago and nearly killed me -lol.

You see... is like Watching Paint Dry! and I finally called it a day cuz lost the knack/gift/whatever and could no longer do the prognostication stuff. But I always think about it and as the saying goes once given, never forgotten :)

I think I know what you mean. That was a great score, I think you got the right pattern without even knowing it. I still think that these patterns can be coded. They won't work forever though.

 

fbj wrote >>


"have added a tick counter which increments each start() entry and gets reset each newBar."



fbj: I hate to ruin your day, but you are avare that Volume[] == number of ticts sent to you and have noting to do with actual nr. of lots traded in MT4? Sounds like your reinventing the wheel to me (unless somthing gott lost in translation).


I used this to calculate a crude hurst exponent a while a go, sadly it's not as efisent as I hoped for... (Jet an other indicator that tells me that there WAS a trend...)


/LV

 

New? well, not think so but the MT arena is not really tick oriented. Am thinking TradeSignal as other side of coin for instance.

Coded pats, yes. My experience was not with pats but subconsciously perhaps yes. Price is chaotic regards pinning it down but recognition of pats would be rather nice :)

My as it were, lateral computing skillset is wanting in this area. My lack of maths educational background hinders... Have often 'felt' but unable to xlat to design and then code.


Well, would need to tie down data formats. Is all doc'd so not issue.

.

some refs:

https://www.mql5.com/en/code/8658

"The script allows conversion CSV tick data into FXT data format. The corresponding HST file can be created at the same time. The file can be imported into the Client Terminal History Center.

The csv file record must be of the following format:
YYYY.MM.DD HH:MI:SS;1.2345

The FXTHeader must be preliminarily downloaded from the Libraries section"


what's the difference between .hst and .fxt files?


How to create HST files form CSV or from TXT files?

Read data from hisrory file

Testing of Expert Advisors in the MetaTrader 4 Client Terminal: An Outward Glance


edit

Tester in the Terminal MetaTrader 4: It Should Be Known


Strategy Tester: Modes of Modeling during Testing


from the terminal's Userguid help file <F1>; search on "FXT" or section: Auto Trading - Strategy Testing - History Files in FXT Format

"History Files in FXT Format

In its operation, tester uses an *.FXT file with generated succession of bars. Each record of the generated succession represents the bar status at either moment within one bar. When modeling bars, tester takes other bars from this file and updates the current bar or adds another one if it has just begun to be formed.

A short description of the format is given below. It begins with the header:"


ahaaa, now I see... https://www.mql5.com/en/forum/117821

:o)

 
LastViking wrote >>

fbj: I hate to ruin your day, but you are avare that Volume[] == number of ticts sent to you and have noting to do with actual nr. of lots traded in MT4? Sounds like your reinventing the wheel to me (unless somthing gott lost in translation).

I used this to calculate a crude hurst exponent a while a go, sadly it's not as efisent as I hoped for... (Jet an other indicator that tells me that there WAS a trend...)

/LV

Thanks heads up. Never touch V. (ticks,volume,lots? you lost me here. no relation for me - I equate 'lots' with MM only) Note that many use 'lots' and 'volume' interchangeably. just look at OrderSend()...

My method is start() entry based and unconcerned with pseudo Volume[] series array content.

each to their own, yes?

;)

 
allerune:


Apart from technical problems, do you have any suggestions on the "micro-trading" strategy?



I'v tryed pretty mush everything from simple MACD to digital bandpass filters. Not shure if I can recomend any of them though. They work, but only if they are turned to curve fit.


ArrayCopy() is your freind then you nead to advace your arrays (tick data buffer for example) in EA (or non index buffers in indicator) (see my pretty T3 MA in the codebase for an example how to do this if you haven't done something like this before).


(I'm curently at a stage there I abnormed all indicators based on derivation / intergation (and thats ~95% of them) and staring from scratch, just looking for probabilty, statisics & PA, but Im just starting so... Nothing at this stage.)


Best,

/LV

Reason: