I coded this up and its v similiar to an EMA. Backtested on the daily charts using my interpretation of the signals. first backtest didnt really show this had an edge. any ideas ?
Quote from Arthur Deco:
This persona is just one in a long string of handle changes to evade embarassment. I have actually been here since '01, I think. I should think that it would be patently obvious that in person I am unbearably obnoxious. Most old people are.
The answer to all of your questions is simple. Yes, you should learn to backtest. Never trade unless you know the setup is relatively stable over time. Always know the stop loss and honor it. Take the system profit with no regrets if it goes higher. Know everything about the sadistical behavior of the system. Have a morning system that might run all day, and have an afternoon system for reversal days. And know how to identify range bound days before they become range bound. Easy, yes?
You want code? You can't handle code!
A money maker on a daily chart:
//deadbandonedayhelperRevA
var alpha=.04;
var filtonlow;var filtonhigh;
function preMain()
{setPriceStudy(false);setPlotType(PLOTTYPE_SQUAREWAVE);setDefaultBarBgColor(Color.RGB(255,165,0));//orange
setComputeOnClose(true);
}
function main()
{
if (filtonlow==null) {filtonlow=low();filtonhigh=high();}
filtonlow=((1-alpha)*filtonlow)+(alpha*low()); filtonhigh=((1-alpha)*filtonhigh)+(alpha*high());
if(high()<filtonhigh && low()<filtonlow){setBarBgColor(Color.red);}
if(low()>filtonlow && high()>filtonhigh){setBarBgColor(Color.lime);}
return;
}