StockFetcher Forums · General Discussion · 4-way buy test<< 1 2 >>Post Follow-up
glgene
613 posts
msg #36475
Ignore glgene
6/26/2005 12:57:07 PM

Newbie question: I suspect my coding below is incorrect. It's meant to be a 4-way test (if all conditions are positive) for a BUY. Did I mess up? Help.

/*EFS 4-way buy signal of a stock
RSI(14) has crossed above 50
and MACD(12) has crossed above MACD(26)
and DPO(10) has crossed above 0
and close has crossed above EMA(30)

Thanks in advance for your replies.

GL Gene


corsino
259 posts
msg #36481
Ignore corsino
6/26/2005 3:20:14 PM

Had to delete a couple of lines and reword others to get results, but didn't have time to finish. Maybe this will give you a start. You can use the debug function to help.



Stocks where RSI(14)crossed above 50 within the last 2 days
and MACD(12) crossed above MACD(26)within the last 2 days

and close crossed above EMA(30)within the last 2 days
and close is between 1 and 10



glgene
613 posts
msg #36482
Ignore glgene
6/26/2005 4:16:21 PM

Corsino,

IBD is negative on stocks < $10 a share. Curious ... why did you select stocks from $1 to $10? Stocks in that range don't attract institutional $$. By the way, I added this as a final line to your suggestion, and gave up on DPO:

"and close increased within the last 1 day"

Ran it, and got 30 results.

Thanks. I'll keep fine-tuning it ... to a degree. Nothing is perfect.

GL Gene


TheRumpledOne
6,407 posts
msg #36484
Ignore TheRumpledOne
6/26/2005 4:34:57 PM

Fetcher[
set{rsi14,count(RSI(14) crossed above 50,1)}
set{macdx,count(MACD(12) crossed above MACD(26),1)}
set{dpo10,count(DPO(10) crossed above 0,1)}
set{cxe30,count(close crossed above EMA(30),1)}

set{x1, rsi14 + macdx}
set{x2, x1 + dpo10}
set{hits, x2 + cxe30}

add column hits
add column rsi14
add column macdx
add column dpo10
add column cxe30

add column dpo(10)
add column rsi(2)
add column weekly rsi(2)

close above 1
volume above 1000000

hits above 0
sort column 5 descending
]



I set up display columns for you because the filter returned 0 stocks.

At least one of your criteria has to be true for a stock to appear on the list.

The stocks with the most hits pop to the top (sorting x3 descending).

Perhaps you may want to adjust the selection criteria because DPO(10) crossed above 0 never "hits". Perhaps it is a SF bug!!

Fetcher[
dpo(10) above 0
add column dpo(10)
]




Hope this helps.

MAY ALL YOUR FILLS BE COMPLETE.


corsino
259 posts
msg #36486
Ignore corsino
6/26/2005 4:37:08 PM

gl gene

I just arbitrarily chose $1 to $10 to cut down the number of returns. I was more interested in getting the syntax correct than in the actual parameters, which can be changed to suit..


TheRumpledOne
6,407 posts
msg #36493
Ignore TheRumpledOne
6/26/2005 4:51:05 PM

Fetcher[
set{rsi14,count(RSI(14) crossed above 50,1)}
set{macdx,count(MACD(12) crossed above MACD(26),1)}

set{cxe30,count(close crossed above EMA(30),1)}

set{x1, rsi14 + macdx}
set{hits, x1 + cxe30}

add column hits
add column rsi14
add column macdx
add column cxe30


add column rsi(2)
add column weekly rsi(2)

close above close 1 day ago
volume above 1000000

hits above 0
sort column 5 descending
]



MAY ALL YOUR FILLS BE COMPLETE.


glgene
613 posts
msg #36498
Ignore glgene
6/26/2005 6:08:07 PM

To the RumpledOne (you're great!)

When I ran your test, I got a "beep" when I clicked on any of the charts (eg. 3m). Couldn't draw a thing. What's up?

Another (basic) question: If I wanted to print the Average Volume next to the Volume column, would I say Average Volume(22) or Average Volume(30) for one month (trading days vs. calendar days)?

Your contribtutions here are so precious. How do you do it? Do you take a "smart pill" daily? Tell me what it is...I'll do it!

GL Gene




TheRumpledOne
6,407 posts
msg #36501
Ignore TheRumpledOne
6/26/2005 9:16:58 PM

Smart pills...lol

Computer science degree ;)

Do YOU want 22 days or 30 or both.

That's your call.




TheRumpledOne
6,407 posts
msg #36502
Ignore TheRumpledOne
6/26/2005 9:18:04 PM

My charts work just fine... check your global settings.


glgene
613 posts
msg #36504
Ignore glgene
6/26/2005 9:40:44 PM

The RumpledOne,

My charts now work fine, too. Don't know what happened before.

I want ONE calendar month. So do I use 22 (trading days) or 30 (calendar days)?

GL Gene


StockFetcher Forums · General Discussion · 4-way buy test<< 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.