We will test the crypto on Bitmex, since there you can easily get ticks with directions for free.
Actually, the idea is very simple:
- we buy if the sum of the volumes of the last 5 transactions is more than 500,000
- we sell if the sum of the volumes of the last 5 transactions is less than -500,000
We trade one conditional cue ball (ticker XBTUSD).
We will use R and the QuantTools package.
We write a little code:
related article: He was bullied at school but now lives a lavish lifestyle thanks to trading in Bitcoin and other cryptocurrency
Results:
related article: Australian investor bought a 2,800sqm property in Charleville with money he earned by innovative financial tool
Everything was calculated somewhere in 38 seconds. Of these, 30 seconds took reading ticks from the disk. Below is the time profile label in milliseconds: