Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
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
3 registered members (NewbieZorro, TipmyPip, AndrewAMD), 14,749 guests, and 7 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
Spectral Analysys Hour Filter #463723
12/22/16 18:28
12/22/16 18:28
Joined: Dec 2016
Posts: 13
Italy
Andrea66 Offline OP
Newbie
Andrea66  Offline OP
Newbie

Joined: Dec 2016
Posts: 13
Italy
Dear All,

I'm a newbie and my target is to modify the following script in order to filter the series : eg: collect data only for hour 7 and then analyse the relevant spectrum.



// Spectral Analysis ///////////////////

//#define FILTER

function run()
{
BarPeriod = 60;
StartDate = 20150401;
EndDate = StartDate + 0100; // 1 month
LookBack = 4*200;
asset("EUR/USD");

vars Price = series(price());
#ifdef FILTER
plot("Filtered",BandPass(Price,24,0.1),NEW,BLACK);
set(PLOTNOW+PLOTLONG);
#else
int Cycle;
for(Cycle = 10; Cycle < 200; Cycle += 1)
plotBar("Spectrum",Cycle,Cycle,Spectrum(Price,Cycl e,4*Cycle),
BARS+AVG+LBL2,BLUE);
#endif
PlotHeight1 = 320;
}



I tried replacing "vars Price = series(price());" with :
"if (hour==7 ) vars Price = series(price());"
but it doesn't work and I receive the following messages :

011 Bandpass called with invalid parameter
011 Bandpass called with invalid parameter
011 Function MAX called with invalid parameter

Could you please help me implementing the correct filter.



Last edited by Andrea66; 12/22/16 18:29.
Re: Spectral Analysys Hour Filter [Re: Andrea66] #464676
03/05/17 01:36
03/05/17 01:36
Joined: Mar 2017
Posts: 2
Atlanta, Georgia
B
BenjaminTurner Offline
Guest
BenjaminTurner  Offline
Guest
B

Joined: Mar 2017
Posts: 2
Atlanta, Georgia
Try:

vars bp = series(BandPass(Price,24,0.1));
plot("Filtered",bp,NEW,BLACK);

To plot the bandpass.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1