Gamestudio Links
Zorro Links
Newest Posts
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
Release 2.68 replacement of the .par format
by Martin_HH. 09/23/25 20:48
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,161 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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,022
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

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