Algokid

AK TREND ID v1.00

9608 20 1326
Hello,

"Are we at the top yet ? "........ " Is it a good time to invest ? " ......." Should I buy or sell ? " These are the many questions I hear and get on the daily basis. 1000's of investors do not know when to go in and out of the market. Most of them rely on the opinion of "experts" on television to make their investment decisions. Bad idea.Taking a systematic approach when investing, could save you a lot of time and headache. If there was only a way to know when to get in and out of the market !! hmmmm. The good news is that there many ways to do that. The bad news is , are you disciplined enough to follow it ?

I coded the AK_TREND ID specifically to identified trends in the SPX             or SPY             only . How does it work ? very simply , I simply plot the spread between the 3 month and 8 month moving average on the chart.

If the spread > 0 @ month end = BUY
if the spread < 0 @ month end = SELL

The AK TREND ID is a LAGGING Indicator , so it will not get you in at the very bottom or get you out at the very top. I did a backtest on the SPX             from 1984 to 7/2/2014 (yesterday), The rule was to buy only when the AK TREND ID was green. let's look at the result:

14 trades : 11 W 3 L , 78.75 % winning %
Biggest winner (%) = 108 %
Biggest loser (%) = -10.7 %
Average Return = 27 %
Total Return since 1984 = 351.3 %
You can see the result in detail here : https://docs.google.com/spreadsheets/d/1-w9f8zlXunrV5dbTc5i3gJN-55vxPTySQv0ooCJCnu0/edit?usp=sharing

Although the backtesting results are good, the AK TREND ID is not to be used as a trading system. It is simply design to let you know when to invest and when to get out. I'm working a more accurate version of this Indicator , that will use both technical and fundamental data. In the mean time , I hope this will give some of you piece of mind, and eliminate emotions from your trading decision. Feel free to modify the code as you wish, but please share your finding with the rest of Trading View community.

All the best

Algo
Remove from Favorite Scripts Add to Favorite Scripts
// AK Trend ID Version 1.00
// This indicator simply indentifies if the market are
// in a up or down trend.
// For SPX or SPY ONLY, Time Frame = Monthly
// Created by Algokid 7/23/2014 
// Toronto, Canada

study("AK_TREND ID (M)")
input1 = 3, input2 = 8 , 

fastmaa = ema(close,input1)
fastmab = ema(close,input2)

bspread = (fastmaa-fastmab)*1.001

adline = 0

m = bspread > 0 ? lime : red

plot (adline,color = white)
plot(bspread, color = m)
barcolor( bspread > 0 ? green :red)
www.passivestor.com

Related Ideas

Algokid PRO
2 years ago
Good backtesting results with gold futures (GC1!) , however, this wasn't coded for that .
+3 Reply
admin PRO
2 years ago
Cool! Thank you for sharing!
+1 Reply
Very cool indicator, ty Algokid
+3 Reply
Algokid PRO HermanBrummer
2 years ago
Thank you Herman, I appreciate your feedback :)
+2 Reply
SirRally
2 years ago
Thank you for your indicator. Do you have any more that you're willing to share?
+1 Reply
Algokid PRO SirRally
2 years ago
I'm working on a few indicators....will share them soon
+1 Reply
Algyros PRO Algokid
2 years ago
Thank you very much.

Could you tell me if you have a sense of this indicator works on other time frames (weekly, daily) besides the monthly one you use?

Alex
Reply
Algyros PRO Algyros
2 years ago
I hate to bother you with more requests, but would it be possible to calculate the CAGR for the years you tested?

Thanks,
Alex
Reply
Algokid PRO Algyros
2 years ago
You are looking at approx. 11 % per year ( from 2000 to 2014)
Reply
Algokid PRO Algyros
2 years ago
I do have the same indicator for using daily time frame. I will publish it soon. There's major difference between the two. I actually like the Monthly time frame better.
Reply
Starlord PRO
2 years ago
I'm looking forward to your improvements. Really great stuff and I appreciate you sharing it.
+1 Reply
Algokid PRO Starlord
2 years ago
Thank you StanLord. Really appreciate your feedback :)
Reply
DepeshMode
2 years ago
hey awesome indicator bro helps me identify entry points on a 1min chart. cheers :)
+1 Reply
Algokid PRO DepeshMode
2 years ago
Thanks for your feedback Depesh
Reply
exponat
a year ago
THANK YOU!
+1 Reply
guidoisot
a year ago
Thank you for the indicator. Could you perhaps modify it to make it universal, ie accepting as inputs not only EMAs but also other indicators:
for ex. I would be interested to see it applied to "JMA RSX Clone ", shorttitle="RSXC_LB"; so that the histogram on the bottom of the attached screenshot would show the spread between the two relative strenghts.
Thanks.
snapshot
Reply
svacharya PRO
10 months ago
Thanks and appreciate your contributions.
Reply
TradeWithConfidence
10 months ago
Really appreciate the love. I'm also from toronto, hopefully I can make this indicator better! Give me a shout. Thank you.
Reply
ekoronin PRO
10 months ago
I am a little confused as to why so much hustle - wouldn't this be a simply MACD (3,8) ? See chart...

snapshot
+5 Reply
MarxBabu ekoronin
2 months ago
I am using AK indicator with other few indicator combination the result is awesome!!!
snapshot


More details on my page or Ping
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out