StockFetcher Forums · General Discussion · How Do You Offset Above and Below a Moving Average<< >>Post Follow-up
wkloss
231 posts
msg #98133
Ignore wkloss
12/20/2010 4:13:11 PM

TASC magazine, 12-2010, page 10 has an article about The JM Internal Band. The concept is to use a MA(15) and offset it 2% above and 2% below. You have a buy signal when price crosses above the upper band and a sell short signal when price crosses below the lower band. Whether going long or short, use the MA(15) as a stop. The author admits that this system can have difficulty when the market is moving sideways, although the system was more flat than experiencing losses.

Help coding this would be appreciated.

Bill

four
5,087 posts
msg #98134
Ignore four
modified
12/20/2010 5:49:46 PM

Fetcher[
draw ma(15)

set{ma15_top, ma(15) * 1.02}
set{ma15_bot, ma(15) * .98}

draw ma15_top on plot close
draw ma15_bot on plot close

add column separator
add column ma(15)
add column ma15_top
add column ma15_bot
]



four
5,087 posts
msg #98135
Ignore four
12/21/2010 12:23:57 AM

Also... Moving Average Envelopes

http://forums.stockfetcher.com/sfforums/?q=view&fid=1006&tid=453&qrid=&isiframe=

wkloss
231 posts
msg #98165
Ignore wkloss
12/22/2010 7:24:39 PM

four,

1st, thanks for your work on this. I added optionable and price above 5 as well as an attempt to get it to display in the order of the most recent cross above the upper line. I'm not sure I got the language about the cross above the upper line correct.

Debug thinks there is a syntax error in the set command on the bottom band.

draw ma(15)

set{ma15_top, ma(15) * 1.02}
set{ma15_bot, ma(15) * .98}

draw ma15_top on plot close
draw ma15_bot on plot close

add column separator
add column ma(15)
add column ma15_top
add column ma15_bot
and is optionable
and price above 5
display in order of most recent cross above ma15_top

Your thoughts?

Bill

mktmole
325 posts
msg #101920
Ignore mktmole
8/1/2011 6:24:14 PM

Fetcher[
draw ma(15)

set{ma15_top, ma(15) * 1.02}
set{ma15_bot, ma(15) * .98}
set{chng, close - ma15_top}
set {golong1, chng / ma15_top}
set{golong, golong1 *100}
and golong above 0
draw ma15_top on plot close
draw ma15_bot on plot close

add column separator
add column ma(15)
add column ma15_top
and add column close
and add column golong {pct_above_top}
and sort by column 9 ascending
add column ma15_bot


and market is not otcbb
and price above 1
and average volume(17) above 300,000
]



StockFetcher Forums · General Discussion · How Do You Offset Above and Below a Moving Average<< >>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.