Gamestudio Links
Zorro Links
Newest Posts
ZorroFix. ini /data and /log path
by jcl. 12/09/25 10:06
Zorro 2.70
by jcl. 12/09/25 10:03
Parameter selection
by jcl. 12/01/25 12:28
ZorroGPT
by TipmyPip. 11/29/25 09:38
webGL
by Ezzett. 11/27/25 23:22
Chart viewer
by clint000. 11/27/25 21:21
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (VoroneTZ), 25,205 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
agasior, mosfet, MonsterX, KF_Investments, Luuk
19186 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Multi-timeframe Prices #488483
12/19/24 21:42
12/19/24 21:42
Joined: Dec 2024
Posts: 4
F
FXSurgeon Offline OP
Guest
FXSurgeon  Offline OP
Guest
F

Joined: Dec 2024
Posts: 4
Hi,
I am really struggling to understand how to fetch prices from multiple timeframes, especially on a new bar from another timeframe (Daily).
I have the following code:

Code
function run()
{
BarPeriod = 15;
TimeFrame = 1;
// do something every M15 bar

TimeFrame = 96;
printf("\nPrevious Day High=%.5f", dayHigh(UTC,1));
}


It produces incorrect results for previous day high. Any ideas how to handle this?

Re: Multi-timeframe Prices [Re: FXSurgeon] #488660
03/15/25 23:33
03/15/25 23:33
Joined: Apr 2020
Posts: 14
Germany
M
M_D Offline
Newbie
M_D  Offline
Newbie
M

Joined: Apr 2020
Posts: 14
Germany
Hi FXSurgeon,

dayHigh/dayLow:
"Returns the open, close, high, low, and pivot point within the market hours (by default, 9:30 am until 16:00 pm) of a given working day and time zone."

BarZone = UTC;
StartMarket = 0005; //for dayHigh/low define start of market
EndMarket = 2355; // ... end the close of market
BarPeriod = 5;

Not sure if you could set both (StartMarket/EndMarket) to 0000, in any case take care that BarPeriod "hits" the given Start and End of the Market. Had before a different issue where other times were given (example: lets assume the same 0005) but my Barperiod (=15;) did not meet the exact given time, so my functions did not get triggered.
Maybe thats not valid for dayHigh/-Low, just test it.

Edit: for dayHigh/Low you dont need to use TimeFrame ! How to use timeframe is showed in workshop 4.
There you see 2 functions above run(). the first has Timeframe =4, which means "take the barperiod within run and multiplicate with 4". In run is used BarPeriod = 60 (1 hour), so the function with Timeframe 4 works on 4 hour bars.




Last edited by M_D; 03/15/25 23:49.

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1