StockFetcher Forums · Filter Exchange · Sylvain Vervoot Modified Trailing ATR stop<< 1 2 >>Post Follow-up
yenaledd
15 posts
msg #78579
Ignore yenaledd
9/4/2009 6:41:36 AM

http://www.traders.com/Documentation/FEEDbk_Docs/2009/06/TradersTips.html

This is way beyond my capabilities to write a filter. Would any of the more experienced filter writers care to take a look at it and determine whether or not this can be accomplished on Stockfetcher. As always, I appreciate the efforts.

chetron
2,817 posts
msg #78656
Ignore chetron
modified
9/4/2009 9:29:30 PM

FOR THE BASIC FOLK, BUT NOT EXACT DUE TO LIMITATIONS....


Fetcher[

/* TACHIKAWA */
/* WORK IN PROGRESS */

SET{VAR1,HIGH - LOW}
SET{VAR2,CMA(VAR1,5)}
SET{VAR3,VAR2 * 1.5}
SET{VAR4,COUNT(VAR1 < VAR3,1)}
SET{VAR5,COUNT(VAR1 > VAR3,1)}
SET{VAR6,VAR1 * VAR4}
SET{VAR7,VAR2 * VAR5}
SET{VHILO,VAR6 + VAR7}

SET{VATRMOD,CMA(VHILO,9)}

SET{VLOSS,3.5 * VATRMOD}
SET{VTRAIL1,CLOSE - VLOSS}
SET{VTRAIL2,CLOSE + VLOSS}

DRAW ATR(5)

DRAW VTRAIL1 ON PLOT PRICE
DRAW VTRAIL2 ON PLOT PRICE

CLOSE ABOVE .1
VOLUME ABOVE 1000000

]



yenaledd
15 posts
msg #78669
Ignore yenaledd
9/5/2009 8:48:12 AM

Chet, Thank you for the efforts. I'm new, so please bear with me. After reading thru SF, it appears that if I wanted this on a weekly basis, all I have to do is add the term weekly in front of the indicator. For each variable that you set, do I just add weekly in front of it, or is there a simpler way to have this accomplished on a weekly basis vs daily? This will allow me to compare how close SF can get to this version of a modified ATR stop.

chetron
2,817 posts
msg #78672
Ignore chetron
modified
9/5/2009 9:33:47 AM

ON A CUSTOM VARIABLE, YOU NEED TO PUT WEEKLY ON EVERY SET LINE THAT CONTAINS A NON-CUSTOM VARIABLE.

FYI, AFTER REVIEWING THE MATH, AND MOSTLY THE LIMITATION OF STOCKFETCHER, THIS IS NOT AN "ATR" STOP THINGY, BUT AN ADR STOP THINGY.


HTH

chetron
2,817 posts
msg #78674
Ignore chetron
modified
9/5/2009 9:39:48 AM

SUCH AS....

Fetcher[


/* TACHIKAWA */
/* BASIC */
/* WEEKLY VERSION */

SET{VAR1,WEEKLY HIGH - WEEKLY LOW}
SET{VAR2,WEEKLY CMA(VAR1,5)}
SET{VAR3,VAR2 * 1.5}
SET{VAR4,COUNT(VAR1 < VAR3,1)}
SET{VAR5,COUNT(VAR1 > VAR3,1)}
SET{VAR6,VAR1 * VAR4}
SET{VAR7,VAR2 * VAR5}
SET{VHILO,VAR6 + VAR7}

SET{VATRMOD,WEEKLY CMA(VHILO,9)}

SET{VLOSS,3.5 * VATRMOD}
SET{VTRAIL1,WEEKLY CLOSE - VLOSS}
SET{VTRAIL2,WEEKLY CLOSE + VLOSS}

DRAW ATR(5)

DRAW VTRAIL1 ON PLOT PRICE
DRAW VTRAIL2 ON PLOT PRICE

DISPLAY WEEKLY
WEEKLY CLOSE ABOVE .1
VOLUME ABOVE 1000000


]



chetron
2,817 posts
msg #78676
Ignore chetron
9/5/2009 9:44:31 AM

FOR THE ADVANCED FOLKS...


PROBLEMS IS THAT THERE ARE SO MANY VARIABLES NEEDED, THAT I AM AT THE LIMITS OF THE ADVANCED SUB.

WHAT THIS MEANS IS THAT YOU CAN NOT NOW USE THE VARIABLE AS INTENDED, IE: CLOSE ABOVE VTRAIL1 1 DAY AGO.


Fetcher[
SET{VARA,HIGH 1 DAY AGO}
SET{VARB,CLOSE 1 DAY AGO}
set{varc,low 1 day ago}


SET{VAR1,HIGH - LOW}
SET{VAR2,CMA(VAR1,5)}
SET{VAR3,VAR2 * 1.5}
SET{VAR4,COUNT(VAR1 < VAR3,1)}
SET{VAR5,COUNT(VAR1 > VAR3,1)}
SET{VAR6,VAR1 * VAR4}
SET{VAR7,VAR2 * VAR5}
SET{VHILO,VAR6 + VAR7}


SET{VAR8,COUNT(LOW < VARA,1)}
SET{VAR9,HIGH - VARB}
SET{VAR10,VAR9 * VAR8}
SET{VAR11,COUNT(LOW > VARA,1)}
SET{VAR12,LOW - VARA}
SET{VAR13,VAR12 * 0.5}
SET{VAR14,VAR9 - VAR12}
SET{VAR15,VAR14 * VAR11}
SET{VHREF,VAR15 + VAR10}

SET{VAR28,COUNT(high > VARc,1)}
SET{VAR29, VARB - LOW}
SET{VAR30,VAR29 * VAR28}
SET{VAR31,COUNT(high < VARc,1)}
SET{VAR32,VARC - HIGH}
SET{VAR33,VAR32 * 0.5}
SET{VAR34,VAR29 - VAR32}
SET{VAR35,VAR34 * VAR31}
SET{VLREF,VAR35 + VAR30}

SET{HILOMAX,MAX(VHILO,VHREF)}
SET{HILOMAX2,MAX(HILOMAX,VLREF)}

SET{VATRMOD,CMA(HILOMAX2,9)}

SET{VLOSS,3.5 * VATRMOD}
SET{VTRAIL1,CLOSE - VLOSS}
SET{VTRAIL2,CLOSE + VLOSS}

ADD COLUMN VTRAIL1

DRAW ATR(5)

DRAW VTRAIL1 ON PLOT PRICE
DRAW VTRAIL2 ON PLOT PRICE


CLOSE ABOVE .1
VOLUME ABOVE 1000000
]



chetron
2,817 posts
msg #78709
Ignore chetron
modified
9/5/2009 8:47:03 PM

TRY THIS OUT....


Fetcher[


/* TACHIKAWA */

SET{VAR1,HIGH - LOW}
SET{VAR2,CMA(VAR1,5)}
SET{VAR3,VAR2 * 1.5}
SET{VAR4,COUNT(VAR1 < VAR3,1)}
SET{VAR5,COUNT(VAR1 > VAR3,1)}
SET{VAR6,VAR1 * VAR4}
SET{VAR7,VAR2 * VAR5}
SET{VHILO,VAR6 + VAR7}

SET{VATRMOD,CMA(VHILO,9)}

SET{VLOSS,3.5 * VATRMOD}
SET{VTRAIL1,CLOSE - VLOSS}
SET{VTRAIL2,CLOSE + VLOSS}

SET{VBUYME,COUNT(CLOSE CROSSED ABOVE VTRAIL2 1 DAY AGO,1)}
SET{VSHORTME,COUNT(CLOSE CROSSED BELOW VTRAIL1 1 DAY AGO,1)}

SET{VPLAYS,VBUYME + VSHORTME}
VPLAYS ABOVE .5
DO NOT DRAW VPLAYS

ADD COLUMN VSHORTME
ADD COLUMN VBUYME

DRAW ATR(5)

DRAW VTRAIL1 1 DAY AGO ON PLOT PRICE
DRAW VTRAIL2 1 DAY AGO ON PLOT PRICE

CLOSE ABOVE .1
VOLUME ABOVE 1000000


SORT COLUMN 5 DESCENDING
]




WEEKLY VERSION............................





Fetcher[


/* TACHIKAWA */
/* WEEKLY VERSION */

SET{VAR1,WEEKLY HIGH - WEEKLY LOW}
SET{VAR2,WEEKLY CMA(VAR1,5)}
SET{VAR3,VAR2 * 1.5}
SET{VAR4,COUNT(VAR1 < VAR3,1)}
SET{VAR5,COUNT(VAR1 > VAR3,1)}
SET{VAR6,VAR1 * VAR4}
SET{VAR7,VAR2 * VAR5}
SET{VHILO,VAR6 + VAR7}

SET{VATRMOD,WEEKLY CMA(VHILO,9)}

SET{VLOSS,3.5 * VATRMOD}
SET{VTRAIL1,WEEKLY CLOSE - VLOSS}
SET{VTRAIL2,WEEKLY CLOSE + VLOSS}

SET{VBUYME,COUNT(WEEKLY CLOSE CROSSED ABOVE VTRAIL2 1 WEEK AGO,1)}
SET{VSHORTME,COUNT(WEEKLY CLOSE CROSSED BELOW VTRAIL1 1 WEEK AGO,1)}

SET{VPLAYS,VBUYME + VSHORTME}
VPLAYS ABOVE .5
DO NOT DRAW VPLAYS

ADD COLUMN VSHORTME
ADD COLUMN VBUYME

DRAW WEEKLY ATR(5)

DRAW VTRAIL1 1 WEEK AGO ON PLOT PRICE
DRAW VTRAIL2 1 WEEK AGO ON PLOT PRICE

WEEK LY CLOSE ABOVE .1
VOLUME ABOVE 1000000

DISPLAY WEEKLY
SORT COLUMN 5 DESCENDING
]






yenaledd
15 posts
msg #78715
Ignore yenaledd
9/6/2009 7:16:46 AM

Looks interesting. In other forums I have seen the Modified Trailing ATR stop as just one line...not an upper and a lower. Trying to sort thru the differences now.

chetron
2,817 posts
msg #78723
Ignore chetron
modified
9/6/2009 1:03:10 PM

IT IS ONE LINE ELSE WHERE, BECAUSE YOU ARE ACTUALLY SWITCHING BETWEEN 2 CONDITIONS. I AM SHOWING BOTH CONDITIONS AND YOU NEED to KNOW WHERE TO SWITCH. YOU CAN USE THE VBUY AND VSHORT AS SWITHCHING SIGNAL. SF WILL NOT LET ME DEVELOP THIS INDICATIOR FURTHER TO DO IT AUTOMATICALLY.

HTH



johnpaulca
12,036 posts
msg #78725
Ignore johnpaulca
9/6/2009 1:43:49 PM

Chet..it doesn't work for the peasants.

StockFetcher Forums · Filter Exchange · Sylvain Vervoot Modified Trailing ATR stop<< 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.