jackmack 334 posts msg #120374 - Ignore jackmack |
6/3/2014 5:01:53 PM
Help if you can please
How do you get SF to list the difference in moving averages?
Looking for the difference in a filter to list the difference between the ma(50) and MA(10).
Thank you if you are able to help.
Cheers
|
four 5,087 posts msg #120380 - Ignore four modified |
6/3/2014 10:43:43 PM
Fetcher[
set{diff, ma(10) - MA(50)}
draw apo(10,50) line at 0 /* Price, $, difference */
draw diff line at 0 /* Notice APO = DIFF */
draw ppo(10,50) line at 0 /* Percent difference*/
add column apo(10,50) /* http://www.stockfetcher.com/forums/Indicators/Absolute-Price-Oscillator-APO/170 */
add column diff
add column ppo(10,50) /* http://www.stockfetcher.com/forums/Indicators/Percent-Price-Oscillator-PPO/171 */
]
|
jackmack 334 posts msg #120399 - Ignore jackmack |
6/4/2014 10:03:50 AM
Thank you for the reply
Your work is great here - again thank you.
Cheers
|
jackmack 334 posts msg #120410 - Ignore jackmack modified |
6/4/2014 11:01:21 AM
.
|
four 5,087 posts msg #120428 - Ignore four modified |
6/4/2014 12:40:44 PM
In answering your questions (deleted above)...
I believe you asked about : back testing
Answer: something I don't automate
Using Kevin's code will adjust the original intent of how you use the code you wished to improve.
I always have trouble working the exit strategy for gain/loss
Hope this helps, Four
---
http://www.stockfetcher.com/forums/Filter-Exchange/A-SIMPLE-MARKET-TIMING-FILTER/103064
The extra code is from the above site
---
|
Kevin_in_GA 4,599 posts msg #120434 - Ignore Kevin_in_GA |
6/4/2014 1:26:35 PM
you need to determine if you are sorting on column 5 ascending or descending.
You are asking how to tweak this, but you are sorting on a momentum-based custom indicator - unless you change that indicator, you'll always end up taking the same trade as the original filter.
What is your exit? Is it when the current stock is no longer the top spot? I think you need to consider optimization of your exit as much as your entry.
|
jackmack 334 posts msg #120444 - Ignore jackmack modified |
6/4/2014 1:49:23 PM
To Kevin -
It would be sorting lowest stt to highest as they are returned (currently it is set to return lowest to highest)
Then that one stock would be selected - bought the next day at the open (run at end of month)
Sell stop set at 5%.
I see your point to the fact that this is short term momentum filter but was also
wondering if there wasn't something that would help increase the odds for favorable returns
when the market isn't always going up ;-)
The optimized exit would be 5% - BUT - to that point if 5% is not met then a sell the
last day of the month in order to roll into the next trade the following month.
I hope that helps explain what I was originally after and/or if this is as good as it will get.
To four
I will review your post - Thank You
Cheers
Kevin - I guess what I meant to ask all along is if there are any supporting indicators that would
"back up" the first selected (returned) stock - like CCI(20) or RSI(14) ect that would say yes or no
to the first returned (lowest stt) stock sort of a confirming (or denying) indication(or) to back up
the original first returned - since the first returned DOES NOT always wind up being the winner
for that month - and so I was just thinking maybe there is something else that would narrow
the field and help in the returns.
Thank you
Cheers
|