Thomas, Thank you for your help. I deleted Condition1b from my formula, but I still don't get any trades on my 15 minute RT chart. I checked the chart and there are several times that a buy should be made according to my formula, but I may be missing something. I have eliminated the condition1b and condition11b both and I still do not get any trades.
Tom --- In [email protected], "Thomas Z." <[EMAIL PROTECTED]> wrote: > > Hi Tom, > > It works fine here, but only if I unmark the Condition1b. > As far as I see the Value is to high. > > Cond1=Condition1a;// AND Condition1b; > > Thomas > www.patternexplorer.com > > > From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf > Of professor77747 > Sent: Saturday, May 05, 2007 6:33 PM > To: [email protected] > Subject: [amibroker] Re: Formula doesn't work on 15 minute chart > > Thank you for your help. I made the corrections, but it still will > not work on a 15 minute RT chart. It will just work on a EOD chart. > > Tom > > --- In [email protected], "Anthony Faragasso" <ajf1111@> > wrote: > > > > Hello, > > > > I have not looked over all of your code...but...there possibly is a > formula mistake in the Sell side.....as in.. > > //sell order > > > > condition11a=barssince(condition1)<=7;...should it read barssince > (Condition11)<=7; > > > > also, > > > > condition12a=barssince(condition2)<=7;...same fix here also,,,,, > > > > Anthony > > > > ----- Original Message ----- > > From: professor77747 > > To: [email protected] > > Sent: Saturday, May 05, 2007 11:47 AM > > Subject: [amibroker] Formula doesn't work on 15 minute chart > > > > > > I have a formula that works when I backtest using an EOD chart, > but > > will not work when I use a 15 minute RT chart. Can anyone tell me > why > > this happens? I am using it on gold futures for June. I am not a > > programmer as you can see by my formula. > > > > The formula is; > > _SECTION_BEGIN("strategy 4/27/07"); > > > > //size of order > > SetPositionSize( 25, spsShares ); > > SetOption("MaxOpenPositions", 4); > > > > //Buy order Conditions > > Condition1=Cross(MACD(),Signal()); > > Condition1a=BarsSince(Condition1) <=7; > > Condition1b=MACD() - Signal() >=.5; > > Cond1=Condition1a AND Condition1b; > > > > Condition2=Cross(StochK(),StochD()); > > Condition2a=BarsSince(Condition2) <=7; > > Condition2b=StochK() - StochD() >=1; > > Cond2=Condition2a AND Condition2b; > > > > Cond4=Cond1 AND Cond2; > > PositionSize= -25; > > > > Buy=Cond4; > > > > //Sell order > > Condition11=Cross(Signal(),MACD()); > > Condition11a=BarsSince(Condition1) <=7; > > Condition11b=MACD() < Signal(); > > Cond11=Condition11a AND Condition11b; > > > > Condition12=Cross(StochD(),StochK()); > > Condition12a=BarsSince(Condition2) <=7; > > Condition12b=StochD() > StochK(); > > Cond12=Condition12a AND Condition12b; > > > > Cond14=Cond11 AND Cond12; > > > > Sell = Cond14; > > > > Short=Sell; > > Cover=Buy; > > > > Thank you, > > Tom > > > > > > > > > > > > > > ---------------------------------------------------------- > -------- > > > > avast! Antivirus: Inbound message clean. > > > > Virus Database (VPS): 000738-3, 05/05/2007 > > Tested on: 5/5/2007 11:52:37 AM > > avast! - copyright (c) 1988-2007 ALWIL Software. > > >
