Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (kzhao, AndrewAMD, bigsmack), 824 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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