Gamestudio Links
Zorro Links
Newest Posts
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
Data from CSV not parsed correctly
by jcl. 04/20/24 08:32
Zorro FIX plugin - Experimental
by jcl. 04/20/24 08:30
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (7th_zorro, Aku_Aku, 1 invisible), 604 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 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