Gamestudio Links
Zorro Links
Newest Posts
Max Number of Strategies in /Strategy folder
by Martin_HH. 06/16/26 11:13
Z9 getting Error 058
by jcl. 06/16/26 09:51
How to select between IB accounts by script?
by AndrewAMD. 06/13/26 15:44
Zorro tutorial ideas?
by AndrewAMD. 06/13/26 15:01
Zorro 3.01 recoded MMI function issue
by 11honza11. 06/13/26 11:40
Stooq now requires an API key
by AndrewAMD. 06/11/26 17:55
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
6 registered members (Martin_HH, Quad, TipmyPip, Grant, 2 invisible), 1,251 guests, and 23 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Student_64151, Koti, curry, DeepxKalsi, Samed
19219 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Is there a way to use SAR() for a different TimeFrame? #438011
03/04/14 19:46
03/04/14 19:46
Joined: Jul 2013
Posts: 522
D
dusktrader Offline OP
User
dusktrader  Offline OP
User
D

Joined: Jul 2013
Posts: 522
I am experimenting with SAR() but I want it to apply to a longer TimeFrame.

For example, if my BarPeriod is 15, I want to look at the SAR for hourly.

I tried the below, but TimeFrame doesn't seem to affect SAR() at all. Is there any way to simulate a wider timeframe by supplying a different input to SAR() ?
Code:
function run() 
{
	StartDate = 20140206;
	EndDate = 20140212;
	BarPeriod = 15;
	
	TimeFrame = 4;	
	vars Price = series(price());
	var sar = SAR(0.02,0.2);
	plot("SAR",sar,DOT,RED);
	TimeFrame = 1;
}


Re: Is there a way to use SAR() for a different TimeFrame? [Re: dusktrader] #438030
03/05/14 09:24
03/05/14 09:24
Joined: Jul 2000
Posts: 28,106
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,106
Frankfurt
Not with the standard SAR from the TA library, because it directly uses the prices, not a data series. But of course an extended SAR could be implemented for this - you can suggest it on the future forum. Or alternatively, you can write a SAR indicator yourself - you can find its algorithm on the web.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1