Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 04/03/26 16:57
TMFs on options in live trading
by Spirit. 03/26/26 19:52
TDAmeritrade plugin with new Schwab accountt?
by AndrewAMD. 03/24/26 17:11
Black Book, 4th edition
by jcl. 03/17/26 09:28
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (TipmyPip, Grant, 1 invisible), 3,268 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
mredit, vestriaa, Lukudo, mldenoiser, the1
19204 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