Gamestudio Links
Zorro Links
Newest Posts
folder management functions
by 7th_zorro. 04/16/24 13:19
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
LPDIRECT3DCUBETEXTUR
E9

by Ayumi. 04/12/24 11:00
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 04/11/24 14:56
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (7th_zorro), 442 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
11honza11, ccorrea, sakolin, rajesh7827, juergen_wue
19045 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Feature Request: Tick Volume #447921
01/13/15 04:27
01/13/15 04:27
Joined: Apr 2014
Posts: 482
Sydney, Australia
B
boatman Offline OP
Senior Member
boatman  Offline OP
Senior Member
B

Joined: Apr 2014
Posts: 482
Sydney, Australia
I know that there is no common exchange for forex, and therefore no accurate volume data, but I have been reading about using tick volume as a proxy for actual volume and the idea seems to have some merit.

Would it be possible to incorporate a feature in Zorro that can handle tick volume data and use it as an input for a system?

I don't know how much of an effort this would be, since volume data is different to the OHLC structure of Zorro's price data. Perhaps a work around would be to sum the ticks in a bar and then set the opening volume equal to the lowest volume and the closing volume equal to the highest volume for each bar. That way Zorro could handle tick volume in the same way it handles price data. Is that even possible?

Cheers
Kris

Re: Feature Request: Tick Volume [Re: boatman] #448095
01/19/15 16:41
01/19/15 16:41
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
Yes, the ticks in a bar are available and can be treated like price data. It is planned to implement data streams for ticks and other data in one of the next versions.

Re: Feature Request: Tick Volume [Re: jcl] #448121
01/20/15 17:03
01/20/15 17:03
Joined: Apr 2013
Posts: 57
3
3DCat Offline
Junior Member
3DCat  Offline
Junior Member
3

Joined: Apr 2013
Posts: 57
I guess tick volume means "number of ticks per bar"?

Re: Feature Request: Tick Volume [Re: 3DCat] #448155
01/21/15 22:21
01/21/15 22:21
Joined: Apr 2014
Posts: 482
Sydney, Australia
B
boatman Offline OP
Senior Member
boatman  Offline OP
Senior Member
B

Joined: Apr 2014
Posts: 482
Sydney, Australia
jcl, that's great news! I am very excited about experimenting with tick data and support its inclusion as a high priority.

3DCat - that's correct.

Re: Feature Request: Tick Volume [Re: boatman] #448173
01/22/15 17:33
01/22/15 17:33
Joined: Apr 2013
Posts: 57
3
3DCat Offline
Junior Member
3DCat  Offline
Junior Member
3

Joined: Apr 2013
Posts: 57
ok. thats kinda raw and full of unnecessary things, but i implemented it once, used some code from the manual and a counter, not more:
you can ignore the logic- least to say is it isn't profitable like that:) but the tc series represents tick volume per minute in that case.

Code:
int count=1;
int lastcount=1;
int b=0;

int tmfTick()
{
	if(b==Bar) count++; else {lastcount=count;count=1;b=Bar;}
        return 0;
}

// start a pending phantom trade for activating a TMF
bool initTick() 
{
  static TRADE* tick = 0;
  if(tick || Bar < LookBack) 
    return false;
  Lots = -1;              // phantom trade
  Entry = 2*priceClose(); // high entry limit
  EntryTime = 999999;     // keep pending forever
  tick = enterLong(tmfTick);
  Lots = 1;               // back to default values
  Entry = 0.;
  EntryTime = 1;
  return tick != 0;
}

function run()
{
	set(TICKS+PLOTNOW);
	Weekend=1;
  BarPeriod=1;
  StartDate=20141202;
  EndDate=20141209;
  PlotWidth=1024;
  Hedge=5;
  LookBack=201;
	Lots=100;
  vars Price=series(price());
  var Dom=DominantPeriod(Price,100);
  vars BP=series(BandPass(Price,Dom*2,0.1));
  plot("BP",BP[0],NEW,BLACK);
  vars tc=series(count);
  vars SM=series(SMA(tc,200));
  var w=(MaxVal(tc,200)-MinVal(tc,200))/3;
  //if (is(INITRUN)) 
  initTick();
  
 // plot("tickCount",lastcount,NEW,BLACK);
  plot("count",count,NEW,BLUE);
  plot("sm",SM[0],0,BLACK);
  plot("upper",SM[0]+w,0,CYAN);
  plot("lower",SM[0]-w,0,MAGENTA);
  plot("Bar",Bar,NEW,BLACK);
  Stop=3*ATR(60);
  Trail=2*ATR(60);
  TrailSlope=350;
 // TrailLock=80;
  if (crossOver(tc,SM[0]-w)and falling(BP) and NumOpenLong<1 //and Bar>360
  ) enterLong();
  if (crossOver(tc,SM[0]-w) and rising(BP) and NumOpenShort<1 //and Bar>360
  ) enterShort();
  
}


Re: Feature Request: Tick Volume [Re: 3DCat] #454654
09/13/15 11:00
09/13/15 11:00
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Sorry for reopening this thread, but my question concerns exactly to this.

Quote:
Yes, the ticks in a bar are available and can be treated like price data.

and from the manual:

Quote:
The fOpen, fClose, fHigh and fLow data streams can be separately accessed in the script. They can alternatively be used to store and access additional data, such as spread, quote frequency, trade volume, [...]

It sounds as if it would be possible, but how can I access the tick volume in a script practically? I think in the normal history (.bar) files it is not set, so do I have to create 'extended .bar files' with a column for the tick volume first (it is generally available through FXCM's ForexConnect API if I understood its manual right)? Or is manually counting the ticks like in 3DCat's example the only way?

Thanks, Sphin

Re: Feature Request: Tick Volume [Re: Sphin] #454792
09/21/15 09:42
09/21/15 09:42
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
I have not tried it, but this should work: Define a pseudo asset like "EURUSD_VOL", and import a price curve of that asset in .bar format. The tick volume can then be either the High, Low, Open, or Close of that curve and you can read it with the price functions.

Alternatively you can also import .t1 format. It contains only a single data value instead of 4 and thus uses less memory. Read it with priceClose().

Re: Feature Request: Tick Volume [Re: jcl] #454863
09/26/15 11:45
09/26/15 11:45
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Many thanks! For the first I keep in mind that it is possible. laugh I read the manual about creating a pseudo asset but I do not understand how to download/access other than price information, in this case the tick volume.
Using t1 means to count the ticks that belong to one minute or to the corresponding bar period?

Re: Feature Request: Tick Volume [Re: Sphin] #454968
09/30/15 21:55
09/30/15 21:55
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Using t1 (and also in live trading) it's easy to account it with the tick() function that I recognized just now, but this works well.


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1