I understand how the logic of the buystop works as currently structured. If the buystop price is not exceeded during the day (High not greaterthan buystop) than the backtester will give me the Low of the day as my filled price. I have tried any number of logic combinations and can not achieve the following.
If the high of the day is not greater than buystop than I want NO trade to occur. For the life of me, I can not achieve a logic combination that cancels the buy if this occurs. I can set the price filled to be the days open, high, low or close, but I can not cancel the buy. Any coding help would be greatly appreciated. Ed -----Original Message----- From: amibroker@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of zoli_j Sent: Wednesday, October 11, 2006 2:14 AM To: amibroker@yahoogroups.com Subject: [amibroker] Re: Buy At Stop, Short At Stop Thank U Thomas!!! --- In amibroker@yahoogroups.com, "Thomas Z." <[EMAIL PROTECTED]> wrote: > > Hi, > > Yes, you can do it easily: > > BuyStop = ... the formula for buy stop level; SellStop = ... the > formula for sell stop level; > > // if anytime during the day prices rise above buystop level (high>buystop) > // the buy order takes place (at buystop or low whichever is higher) > Buy = Cross( High, BuyStop ); > > // if anytime during the day prices fall below sellprice level ( low < > sellstop ) > // the sell order takes place (at sellstop or high whichever is lower) > Sell = Cross( SellPrice, SellStop); > > BuyPrice = max( BuyStop, Low ); // make sure buy price not less than Low > SellPrice = min( SellStop, High ); // make sure sell price not greater than > High > > Thomas > > www.tradingbasis.com <http://www.tradingbasis.com/> > > > > > > _____ > > From: amibroker@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf > Of zoli_j > Sent: Tuesday, October 10, 2006 5:49 PM > To: amibroker@yahoogroups.com > Subject: [amibroker] Buy At Stop, Short At Stop > > > > Hallo Group, > > Is it possible to entry with stop into a trade? > If yes then could U show me an AFL example for it? > > BR Zoli. > Please note that this group is for discussion between users only. To get support from AmiBroker please send an e-mail directly to SUPPORT {at} amibroker.com For other support material please check also: http://www.amibroker.com/support.html Yahoo! Groups Links -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.408 / Virus Database: 268.13.2/471 - Release Date: 10/10/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.408 / Virus Database: 268.13.2/472 - Release Date: 10/11/2006 Please note that this group is for discussion between users only. To get support from AmiBroker please send an e-mail directly to SUPPORT {at} amibroker.com For other support material please check also: http://www.amibroker.com/support.html Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/amibroker/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/amibroker/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/