Thursday, May 28, 2009

Timing is everything, end false signals.

A reader, Bryan wrote in last week with a common complaint about MA's.

"I want to find the best time to enter and exit an order. EMA's are great but so many times a fast line will cross a slow line but then turn right around and un-cross. I want a way to keep from entering and exiting orders to often. It seems like
whenever the fast EMA crosses the slow EMA AND a certain amount of time passes the combination of those 3 events signals a longer term trend. When I say "long" I
mean like half a day for day trading"

Here's a study for you. The indicator stays 'red' after the Moving Averages cross. When it turns green you are in the safe zone. This is great for true mechanical systems to make sure you don't enter and exit on false signals.

input price = close;
input Shorter_Time = 10;
input Longer_Time = 21;

Def difference = average(data = price[1], length = Longer_Time) - average(data = price[1], length = Shorter_Time);

plot timer=price[1];
timer.AssignValueColor(if difference <0 then
if difference >= 0 then
blog comments powered by Disqus