It looks like my chart image didn't work so I am putting a link to the image here.
<a href=http://www.ethingamajigs.com/Chart.jpg>www.ethingamajigs.com/Char t.jpg</a> I don't know if this will work. If it doesn't, just go to www.ethingamajigs.com/Chart.jpg --- In [email protected], "professor77747" <[EMAIL PROTECTED]> wrote: > > When I backtest my formula, all the buys and sells are shown > correctly except one. I cannot figure out what is wrong. Here is the > buy and sell code: > //Buy Signals > > Condition1 = C > Dropline AND Ref(C,-1) < Ref(Dropline,-1); > Cond1=StochK() - Ref(StochK(),-1) >1; > Cond2=MACD() > Ref(MACD(),-1); > Cond6=StochD()<25; > Cond7=BarsSince(Cond6) <=7; > > > //Sell Signals > > Condition10 = C < Increase AND Ref(C,-1) > Ref(Increase,-1); > Cond11=StochK() - Ref(StochK(),-1) < 1; > Cond12=MACD() < Ref(MACD(),-1); > Cond16=StochD()>75; > Cond17=BarsSince(Cond16) <=7; > > //Buy and Sell orders > > Buy = BarsSince(Condition1) <=5 AND Cond1 AND Cond7; > Sell = BarsSince(Condition10) <=5 AND cond11 AND Cond17; > > //Short and Cover conditions > > Short = Sell; > Cover=buy; > > Graham wrote the code for the Condition1 and Condition10. It plots an > arrow on the graph so I know that it works. I have checked the > stochastic and macd for the buy in question and these are the > figures: > > 3/10 Stok = 20.06 > 3/13 Stok = 26.42 > 3/14 Stok = 34.98 > > 3/13 Macd = -1.74 > 3/14 Macd = -1.54 > 3/14 Green up arrow > > The formula should have covered my short and placed a buy. > > It held my short and did not place a buy. > > Everything else is perfect except that one day. I have backtested > from 9/2/05 and have 12 trades. > > Thanks, > Tom >
