StockFetcher Forums · Filter Exchange · MY XIV TRADING SYSTEM USING STRATASEARCH FILTERS<< 1 ... 21 22 23 24 25 ... 40 >>Post Follow-up
graftonian
1,089 posts
msg #140180
Ignore graftonian
modified
12/18/2017 9:28:39 AM

I am attempting to sf code some of your strategies. Is the sector in your strategy a single security sector?
if so, would:

// Chande Momentum Oscillator - Sector OB/OS: 2
(sector("XIV", cmo(17)) < sector("XIV", mov(cmo(17), 5, simple)))

equate to:

cmo(close,17) < mov(cmo(close,17), 5, simple)

or in "stockfetcherese"

cmo(17) less than cma(cmo(17), 5))

Thanx, and thanx again for sharing

Kevin_in_GA
4,599 posts
msg #140186
Ignore Kevin_in_GA
12/18/2017 12:30:48 PM

Yes, that is the correct SF syntax.

graftonian
1,089 posts
msg #140210
Ignore graftonian
12/18/2017 10:29:10 PM

STRUGGLING WITH SF CODING THESE FILTERS, BUT HERES #18

Fetcher[
/**************************
LEFT TO CODE
// Price and Volume Trend Divergence - Market Pds: 1
(sector($curexchange, close) <> sector($curexchange, high(close, 70)) or
sector($curexchange, pvt()) = sector($curexchange, high(pvt(), 70))) and

**************************/
symlist(XIV, UPRO, TQQQ, NUGT, JNUG)
add column ROC(10,1)
sort on column 5 descending
draw ema(13)

set{NVIAVG5, cma(NVI,5)}
set{ENTRY1, count(NVI crossed above NVIAVG5, 1)}
set{entry2, count(CMO(17) < cma(cmo(17), 5),1)}
set{trigger1, entry1 + entry2}

/*** diverge(stochk(13, 5), mov(close, 3, simple), 7, 17)) <> 1 ***/

/*CODING FOR DIVERGENCES CODE COMPLIMENTS OF KEVIN */

SET{VAR1_UP, COUNT(Stochastic %K(13,5) GAINED MORE THAN 7% OVER THE LAST 17 DAYS,1)}
SET{VAR1_DN, COUNT(Stochastic %K(13,5) DROPPED MORE THAN 7% OVER THE LAST 17 DAYS,1)}

SET{VAR2_UP, COUNT(MA(3) GAINED MORE THAN 7% OVER THE LAST 17 DAYS,1)}
SET{VAR2_DN, COUNT(MA(3) DROPPED MORE THAN 7% OVER THE LAST 17 DAYS,1)}

SET{POS_DIV, VAR1_UP * VAR2_DN}
SET{NEG_DIV1, VAR1_DN * VAR2_DN}
SET{NEG_DIV, NEG_DIV1 * -1}
SET{ENTRY3, COUNT(POS_DIV < 1, 1)}
SET{TRIGGER2, TRIGGER1 + ENTRY3}
DRAW TRIGGER2 /* 3 IS THE TRIGGER POINT */
]



vilchuck
2 posts
msg #140212
Ignore vilchuck
12/18/2017 10:44:14 PM

"Update: Closed out the remaining 1,000 shares at $133.00 for a gain of $12,750. Total return on this set of trades was $70,660, or 5.9% on my initial investment of $1,198,000. Scaling out results in a lower overall return if the ETF keeps plowing up, as XIV has done this past month."

Nicely done Kevin and thanks for sending the SS files previously. It would be interesting to compare your 5.9% actual results to "theoretical" by running a backtest on the MS during the time period you actively traded the system to see how they compare. Approximately what time period do these results cover?

Kevin_in_GA
4,599 posts
msg #140214
Ignore Kevin_in_GA
12/19/2017 8:05:47 AM

Current signals - one new BUY signal from last night.

SideActionPFOrderTypeProductSymbolNameBuyDateBuyPriceClosePriceGainLossSystemName
LongBuy10MarketStockXIVXIV 135.24 XIV MULTISYSTEM #33
LongHold10StockXIVXIV12/18/2017135.17135.240.05%XIV MULTISYSTEM #40
LongHold10StockXIVXIV12/5/2017116.7135.2415.89%XIV MULTISYSTEM #23
LongHold10StockXIVXIV12/18/2017135.17135.240.05%XIV MULTISYSTEM #6


Currently holding 3,000 shares at $135.05 (posted yesterday in another thread). Will not add here since I am okay with the current amount and allocation price.

tennisplayer2
210 posts
msg #140215
Ignore tennisplayer2
12/19/2017 8:43:26 AM

I did not get the additional buy. Last night's signal for today were just the 3 holds. I wonder why we are getting a discrepancy. Thanks.

lavapit315
47 posts
msg #140217
Ignore lavapit315
12/19/2017 8:47:55 AM

Mine showed exactly as Kevin posted. FYI

graftonian
1,089 posts
msg #140219
Ignore graftonian
12/19/2017 10:07:18 AM

Help! Is there a way to code stopdown(5) in stockfetcherese?


Kevin_in_GA
4,599 posts
msg #140220
Ignore Kevin_in_GA
12/19/2017 10:29:48 AM

Not really. This requires the filter to know the entry price. SF does not retain this type of data (although it should).

You might be able to add the entry price as a set statement (using the date() function) and then set a trigger at that value * 0.95?

graftonian
1,089 posts
msg #140222
Ignore graftonian
12/19/2017 11:10:07 AM

After I pressed the enter key, I knew that was a dumb question.
Here is my attempt at Filter 1

Fetcher[
/*********XIV 1 ***********/
symlist(XIV, UPRO, TQQQ, NUGT, JNUG)
add column ROC(10,1)
sort on column 5 descending
CHART-TIME IS 1 YEAR

/***Projection Oscillator(8)***/
SET{VAR1_UP, COUNT(Projection Oscillator(8) GAINED MORE THAN 7% OVER THE LAST 11 DAYS,1)}
SET{VAR1_DN, COUNT(Projection Oscillator(8) DROPPED MORE THAN 7% OVER THE LAST 11 DAYS,1)}

SET{VAR2_UP, COUNT(MA(3) GAINED MORE THAN 7% OVER THE LAST 11 DAYS,1)}
SET{VAR2_DN, COUNT(MA(3) DROPPED MORE THAN 7% OVER THE LAST 11 DAYS,1)}

SET{POS_DIV, VAR1_UP * VAR2_DN}
SET{NEG_DIV1, VAR1_DN * VAR2_DN}
SET{NEG_DIV, NEG_DIV1 * -1}
SET{ENTRY1, COUNT(POS_DIV EQUALS 1, 1)}
SET{TRIGGER, ENTRY1}
DRAW TRIGGER

/***MACD()***/
SET{MACD_CEMA, CEMA(MACD(), 17)}
SET{EXIT1, COUNT(MACD() CROSSED ABOVE MACD_CEMA, 1)}
DRAW EXIT1

/***
A 5% stoploss is part of this signal, but how does one code that?
***/

]



StockFetcher Forums · Filter Exchange · MY XIV TRADING SYSTEM USING STRATASEARCH FILTERS<< 1 ... 21 22 23 24 25 ... 40 >>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.