Gamestudio Links
Zorro Links
Newest Posts
Lapsa's very own thread
by Lapsa. 06/08/26 22:41
Stooq now requires an API key
by VHX. 06/08/26 20:14
ZorroGPT
by TipmyPip. 06/06/26 12:36
Zorro 3.01 recoded MMI function issue
by TipmyPip. 06/04/26 05:44
SGT_FW
by Aku_Aku. 05/31/26 11:05
Issues resuming trades on Demo account
by Martin_HH. 05/22/26 13:31
XTB
by pr0logic. 05/18/26 12:27
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (Grant, TipmyPip), 3,248 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Seraphinang, 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,101
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,101
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