Hi,
I wrote a little volatility breakout program for the S&P. I have the following questions:
1) The program runs on a 10 minute chart (sp z3=2,10) but one of the inputs it needs is the ATR of a daily chart. How can this be done? I wrote the following little work-around, but it is obviously just an average range and not quite as accurate.
rnghi = 0;
rnglo = 0;
sumrng=0;
for (i=0; i < 31 ; i++) {
rnghi = high(-i,1,"sp #f=2,d");
rnglo = low(-i,1,"sp #f=2,d");
sumrng += rnghi - rnglo;
}
avgrng= sumrng / 30
2) How can I backtest more than 7 days? I set up the time template for 30 days, but it makes no difference. The sample btEMA.efs file works as expected, so I know the time template is set up correctly. What things should I look for in my program that would cause this problem?
3) How do I set point values for futures? In my 7-day test it shows a gain of 7.69, which is of course, impossible in the S&P. Even ignoring the improper figures for now, how do I tell the backtester that the S&P is woth $250. per point?
That is enough questions for now. Many many questions have been answered by doing a search on thes forums. What a great resource! I am grateful for any help that any of you can provide.
Jamie
I wrote a little volatility breakout program for the S&P. I have the following questions:
1) The program runs on a 10 minute chart (sp z3=2,10) but one of the inputs it needs is the ATR of a daily chart. How can this be done? I wrote the following little work-around, but it is obviously just an average range and not quite as accurate.
rnghi = 0;
rnglo = 0;
sumrng=0;
for (i=0; i < 31 ; i++) {
rnghi = high(-i,1,"sp #f=2,d");
rnglo = low(-i,1,"sp #f=2,d");
sumrng += rnghi - rnglo;
}
avgrng= sumrng / 30
2) How can I backtest more than 7 days? I set up the time template for 30 days, but it makes no difference. The sample btEMA.efs file works as expected, so I know the time template is set up correctly. What things should I look for in my program that would cause this problem?
3) How do I set point values for futures? In my 7-day test it shows a gain of 7.69, which is of course, impossible in the S&P. Even ignoring the improper figures for now, how do I tell the backtester that the S&P is woth $250. per point?
That is enough questions for now. Many many questions have been answered by doing a search on thes forums. What a great resource! I am grateful for any help that any of you can provide.
Jamie
Comment