Thank you. It worked!
--- In [email protected], "Tomasz Janeczko" <[EMAIL PROTECTED]> wrote: > > Set Trade delay to 1 and price to open in the Automatic Analysis -> Settings > > Best regards, > Tomasz Janeczko > amibroker.com > ----- Original Message ----- > From: "electricwally77" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Tuesday, October 21, 2008 1:23 AM > Subject: [amibroker] How to "Enter Long" at Open on Next Day > > > >I appreciate any code help if possible. > > > > I've been at my code for hours and can't figure out what I did wrong. > > > > I'm trying to tell my system to Enter Long on the Next Trading Day (at > > the open price) only if the "Buy" rules are True the trading day before. > > > > Likewise, I'm trying to tell my system to Exit Long on the Next > > Trading Day (at the open price) only if the "Sell" rules are True the > > trading day before. > > > > In other words, If my system tells me to buy or sell on a particular > > day, I only want to execute the trade at the open on the next trading > > day (not the same day the system identifies a trade). > > > > Here is my code below: > > > > Cond1 = Ref(Close,-1); BuyPrice = Open; > > Cond2 = Close > MA( Close, 20 ); > > Cond3 = MA( Close , 20 ) > MA( Close , 80 ); > > Cond4 = MA( Close , 20 ) > MA( Close , 150 ); > > Buy = Cond1 AND Cond2 AND Cond3 AND Cond4; > > > > Cond4 = Ref(Close,-1); SellPrice = Open; > > Cond5 = Close < MA( Close, 20 ); > > Cond6 = MA( Close , 20 ) < MA( Close , 80 ); > > Cond7 = MA( Close , 20 ) < MA( Close , 150 ); > > Sell = Cond4 AND Cond5 AND Cond6 AND Cond7; > > > > Thanks you members. > > > > > > ------------------------------------ > > > > **** IMPORTANT **** > > This group is for the discussion between users only. > > This is *NOT* technical support channel. > > > > ********************* > > TO GET TECHNICAL SUPPORT from AmiBroker please send an e-mail directly to > > SUPPORT {at} amibroker.com > > ********************* > > > > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: > > http://www.amibroker.com/devlog/ > > > > For other support material please check also: > > http://www.amibroker.com/support.html > > > > ********************************* > > Yahoo! Groups Links > > > > > > >
