StockFetcher Forums · General Discussion · Anyone read the article about Average Peak Excursion in TASC?<< 1 2 >>Post Follow-up
guru_trader
485 posts
msg #42499
Ignore guru_trader
3/26/2006 4:38:11 AM

Has anyone read the article about "Average Peak Excursion" in the April 2006 issue of Technical Analysis of Stocks and Commodities (TASC)? I would like to see an SF filter for it.

Claims:
Using APE, you can:
1. Select stocks that tend to yield higher-trading rates of returns than other stocks
2. Select stocks for a higher relative reward compared with risk
3. Determine the best trading time frame to maximize the rate of return for a given stock

...


Koronbock
201 posts
msg #42501
Ignore Koronbock
3/26/2006 9:08:56 AM

I do not have the article. If someone is to help you, some kind of formula or at least written "rules" are needed to convert it to something SF can deal with.




woodsmen63
23 posts
msg #42503
Ignore woodsmen63
3/26/2006 9:40:58 AM

http://www.traders.com/Documentation/FEEDbk_docs/TradersTips/TradersTips.html

This month's tips include formulas and programs for:

TRADESTATION: AVERAGE PEAK EXCURSION (APE)
METASTOCK: AVERAGE PEAK EXCURSION (APE)
WEALTH-LAB: AVERAGE PEAK EXCURSION (APE)
AMIBROKER: AVERAGE PEAK EXCURSION (APE)
eSIGNAL: AVERAGE PEAK EXCURSION (APE)
NEUROSHELL TRADER: AVERAGE PEAK EXCURSION (APE)
NEOTICKER: AVERAGE PEAK EXCURSION (APE)
TRADING SOLUTIONS: AVERAGE PEAK EXCURSION (APE)
AIQ SYSTEMS: AVERAGE PEAK EXCURSION (APE)
TECHNIFILTER PLUS: AVERAGE PEAK EXCURSION (APE)
TRADECISION: AVERAGE PEAK EXCURSION (APE)
BIOCOMP DAKOTA: AVERAGE PEAK EXCURSION (APE)
TRADE NAVIGATOR/TradeSense: AVERAGE PEAK EXCURSION (APE)
VTTRADER: AVERAGE PEAK EXCURSION (APE)

This all I could find, has to do with absolute value




TheRumpledOne
6,411 posts
msg #42506
Ignore TheRumpledOne
modified
3/26/2006 10:37:30 AM

Here's the code for TradeStation:

inputs:
Period( 20 ) ;

variables:
APELength( 250 ),
TestOpen( 0 ),
OneDayPE( 0 ),
PE( 0 ),
APE1( 0 ),
APEN( 0 ),
Count( 0 ) ;

array:
OneDayPEArray[ 250 ]( 0 ),
PEArray[ 250 ]( 0 ) ;

TestOpen = Open[ Period - 1 ] ;

OneDayPE = MaxList( High - Open, Open - Low ) / Open ;
PE = MaxList( TestOpen - Lowest( Low, Period ),
Highest( High, Period ) - TestOpen) / TestOpen ;

for Count = 250 downto 2
begin
OneDayPEArray[ Count ] = OneDayPEArray[ Count - 1 ];
PEArray[ Count ] = PEArray[ Count - 1 ] ;
end ;
OneDayPEArray[ 1 ] = OneDayPE ;
PEArray[ 1 ] = PE ;

if CurrentBar > 250 then
begin
APEN = AverageArray( PEArray, APELength ) ;
APE1 = AverageArray( OneDayPEArray, APELength ) ;
Plot1( APE1, "APE-1" ) ;
Plot2( APEN, "APE-N" ) ;
end ;
if APE1 > 0 and Log( Period ) > 0 then
Plot3( Log( APEN /APE1 ) / Log( Period ), "Alpha" );


first attempt:

Fetcher[

set{TestOpen, Open 19 days ago }
set{HO, high - open}
set{OL, Open - low}
set{MaxPE, max( HO, OL) }
set{OneDayPE, MaxPE / Open}
set{PE1, TestOpen - low 20 day low }
set{PE2, high 20 day high - TestOpen }
set{PE3, Max(PE1, PE2) }
set{PE, PE3 / TestOpen }

set{APEN, CEMA(PE, 250) }
set{APE1, CEMA(OneDayPE, 250) }

set{AA1, APEN / APE1}
set{LogAA1, Log(AA1) }
set{LogPeriod, Log(20) }
set{Alpha, LogAA1 / LogPeriod}

add column APEN
add column APE1
add column Alpha

close above 20
volume above 1000000
]





TheRumpledOne
6,411 posts
msg #42507
Ignore TheRumpledOne
modified
3/26/2006 10:37:42 AM

Attempt one POTENTIAL FILTER ERROR.. BLEW UP!

So let's see how far we can go:

Fetcher[
set{TestOpen, Open 19 days ago }
set{HO, high - open}
set{OL, Open - low}
set{MaxPE, max( HO, OL) }
set{OneDayPE, MaxPE / Open}
set{PE1, TestOpen - low 20 day low }
set{PE2, high 20 day high - TestOpen }
set{PE3, Max(PE1, PE2) }
set{PE, PE3 / TestOpen }


add column OneDayPE
add column PE

close above 20
volume above 1000000
]



So far, so good.



TheRumpledOne
6,411 posts
msg #42508
Ignore TheRumpledOne
modified
3/26/2006 10:37:54 AM

Fetcher[
set{TestOpen, Open 19 days ago }
set{HO, high - open}
set{OL, Open - low}
set{MaxPE, max( HO, OL) }
set{OneDayPE, MaxPE / Open}
set{PE1, TestOpen - low 20 day low }
set{PE2, high 20 day high - TestOpen }
set{PE3, Max(PE1, PE2) }
set{PE, PE3 / TestOpen }

set{APEN, CEMA(PE, 250) }
set{APE1, CEMA(OneDayPE, 250) }

add column APEN
add column APE1

close above 20
volume above 1000000
]



Some interesting things happening...




TheRumpledOne
6,411 posts
msg #42509
Ignore TheRumpledOne
modified
3/26/2006 10:38:12 AM

Fetcher[
set{TestOpen, Open 19 days ago }
set{HO, high - open}
set{OL, Open - low}
set{MaxPE, max( HO, OL) }
set{OneDayPE, MaxPE / Open}
set{PE1, TestOpen - low 20 day low }
set{PE2, high 20 day high - TestOpen }
set{PE3, Max(PE1, PE2) }
set{PE, PE3 / TestOpen }

set{APEN, CEMA(PE, 250) }
set{APE1, CEMA(OneDayPE, 250) }

set{AA1, APEN / APE1}
set{LogAA1, Log(AA1) }



add column LogAA1


close above 20
volume above 1000000
]



It's still working...



TheRumpledOne
6,411 posts
msg #42510
Ignore TheRumpledOne
modified
3/26/2006 10:39:56 AM

Fetcher[
set{TestOpen, Open 19 days ago }
set{HO, high - open}
set{OL, Open - low}
set{MaxPE, max( HO, OL) }
set{OneDayPE, MaxPE / Open}
set{PE1, TestOpen - low 20 day low }
set{PE2, high 20 day high - TestOpen }
set{PE3, Max(PE1, PE2) }
set{PE, PE3 / TestOpen }

set{APEN, CEMA(PE, 250) }
set{APE1, CEMA(OneDayPE, 250) }

set{AA1, APEN / APE1}
set{LogAA1, Log(AA1) }
set{LogPeriod, Log(20) }

add column LogPeriod

close above 20
volume above 1000000
]



SF doesn't like:

set{LogPeriod, Log(20) }
add column LogPeriod





TheRumpledOne
6,411 posts
msg #42511
Ignore TheRumpledOne
modified
3/26/2006 11:01:54 AM

Fetcher[
set{TestOpen, Open 19 days ago }
set{HO, high - open}
set{OL, Open - low}
set{MaxPE, max( HO, OL) }
set{OneDayPE, MaxPE / Open}
set{PE1, TestOpen - low 20 day low }
set{PE2, high 20 day high - TestOpen }
set{PE3, Max(PE1, PE2) }
set{PEx, PE3 / TestOpen }

set{APEN, CEMA(PEx, 250) }
set{APE1, CEMA(OneDayPE, 250) }

set{AA1, APEN / APE1}
set{LogAA1, Log(AA1) }
set{xx, 20}
set{LogPeriod, Log(xx) }
set{Alpha, LogAA1 / LogPeriod }

/*
add column OneDayPE
add column PEx
*/

add column APEN
add column APE1
add column Alpha

close above 20
volume above 1000000
]



Got it to work!! Looks like SF has a small bug.

But will have to compare this filter to TradeStation to see if the values match...






TheRumpledOne
6,411 posts
msg #42512
Ignore TheRumpledOne
modified
3/26/2006 11:16:54 AM

So far...

APE1 matches TradeStation

APEN and ALPHA doesn't match.

OK, got the above working.

APEN within .01.

MAY ALL YOUR FILLS BE COMPLETE.

P.S. guru_trader, you owe me BIGTIME for this one ... LOL!








StockFetcher Forums · General Discussion · Anyone read the article about Average Peak Excursion in TASC?<< 1 2 >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2022 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.