Gamestudio Links
Zorro Links
Newest Posts
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Petra, AndrewAMD, Quad, VoroneTZ, 1 invisible), 488 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Tick data and OHLC in the same script #478894
01/07/20 16:47
01/07/20 16:47
Joined: Jan 2020
Posts: 4
P
pablomfz Offline OP
Guest
pablomfz  Offline OP
Guest
P

Joined: Jan 2020
Posts: 4
Hi,

I wondering if it is possible to work with OHLC data in a script that it needs tick data:

I set:
Code
set(PLOTNOW, TICKS);
History = ".t1";
BarPeriod = 1./60;

and in the tick function:
Code
function tick()
{
  // do whatever you want
  printf("\nLast Tick: %f", priceClose(0)); //This prints the quote price successfully

  printf("\n Price Low Time Frame 5 min: %f , Price Low Time Frame 60: %f", priceLow(0),PriceLow(0)); //Here I see OHLC data for 1 second but I need priceLow for 5min and 60 min
}

How can I access OHLC from different timeframes while the script is using .t1 files with a BarPeriod = 1./60?
Thank you!

Pablo.

Re: Tick data and OHLC in the same script [Re: pablomfz] #478895
01/07/20 21:37
01/07/20 21:37
Joined: Dec 2019
Posts: 53
ozgur Offline
Junior Member
ozgur  Offline
Junior Member

Joined: Dec 2019
Posts: 53
Declare global series() and fill them in run() using TimeFrame then access them in tick() [Assuming you are after for closed bar values].


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