Gamestudio Links
Zorro Links
Newest Posts
SGT_FW
by Aku_Aku. 11/30/26 08:19
Removing outliers from files
by JeyKey II. 11/29/26 10:01
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (JeyKey II, AndrewAMD, EvanTJ), 5,495 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Notch Filter & Bandpass Filter #487094
01/16/23 06:09
01/16/23 06:09
Joined: Mar 2019
Posts: 24
S
Smallz Offline OP
Newbie
Smallz  Offline OP
Newbie
S

Joined: Mar 2019
Posts: 24
I played around with ChatGPT and asked it totell me what spectral filters can be used for trading and gave it an example in Lite-C.
Then I asked it for an example for a Nothc Filter and a Bandpass Filter

Here is what I got:
Code
 
// Notch filter
function tradeNF()
{
    var NotchWidth = optimize(10,5,30);
    var Threshold = optimize(0.1,0.05,0.5);
    var DominantFrequency = DominantFrequency(Prices);
    var NotchFrequency = DominantFrequency - NotchWidth;
    vars NotchFilter = series(NotchFilter(Prices,NotchFrequency,NotchWidth));
    vars Signals = series(Fisher(NotchFilter,NORMPERIOD));
    algoSetup();

    if(crossUnder(Signals,-Threshold)) 
        trade(-1);
    else if(crossOver(Signals,Threshold)) 
        trade(1);
}



and

Code
// BandStop filter
function tradeBSF()
{
    var BandStopWidth = optimize(10,5,30);
    var Threshold = optimize(0.1,0.05,0.5);
    var DominantFrequency = DominantFrequency(Prices);
    var StopFrequencyLow = DominantFrequency - BandStopWidth;
    var StopFrequencyHigh = DominantFrequency + BandStopWidth;
    vars BandStopFilter = series(BandStopFilter(Prices,StopFrequencyLow,StopFrequencyHigh));
    vars Signals = series(Fisher(BandStopFilter,NORMPERIOD));
    algoSetup();

    if(crossUnder(Signals,-Threshold)) 
        trade(-1);
    else if(crossOver(Signals,Threshold)) 
        trade(1);
}




"DominantFrequency" is an unknown variable, however
Anybody have fun playing around with this? Not sure about the optimize values, etc...

Last edited by Smallz; 01/16/23 06:13.
Re: Notch Filter & Bandpass Filter [Re: Smallz] #487410
04/10/23 18:09
04/10/23 18:09
Joined: Apr 2023
Posts: 19
R
rki Offline
Newbie
rki  Offline
Newbie
R

Joined: Apr 2023
Posts: 19
BandStop filter is not a BandPass filter


Moderated by  Petra 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1