It's not a matter of how smart or not AB is ... Only of how granular the data is and possibly how smart the user is ...
--- In [email protected], "Clement Chin" <[EMAIL PROTECTED]> wrote: > > Thanks. You have shown me one of the ways to write the AFL. I think if we > have smaller timeframe data, Amibroker may be smart enough to look inside > each bar to verify which one happens first. :> > > > > Clement > > > > > > From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf > Of Fred > Sent: Wednesday, June 06, 2007 11:20 PM > To: [email protected] > Subject: [amibroker] Re: How to check whether a Buy Stop is hit first or its > Protective Stop is hit first? > > > > For any given bar you can't tell which event occured first ... If you > need more granularity you'll need to move to shorter timeframe > oriented data ... > > --- In [email protected] <mailto:amibroker% 40yahoogroups.com> , > "Clement Chin" <yitman@> wrote: > > > > Anyone can show me something for this case? TIA. > > > > +++ > > > > > > > > > > > > Hi, > > > > > > > > I put a Buy Stop to buy breakouts from high of last bar. A > protective stop > > is attached to the Buy Stop to protect the order once the Buy Stop > is hit. > > > > > > > > I use 30-minute bar to make decision. > > > > > > > > Here is a case. > > > > > > > > The previous high is 1.3050. I will buy at 1.3051. Once entry, I > will put a > > protective sell stop at 1.3041. I want to back test the system. > > > > > > > > From the 30-minute chart, the next bar has a high of 1.3090 and a > low of > > 1.3020. Apparently, my Buy Stop is hit sometime during the 30- minute > > session. My planned protected stop is hit also sometime during the > same > > session. The price may hit my Buy Stop first and then hit my > protective stop > > later... Or it may hit the low of the 1.3020 first, and move all > the way up > > to 1.3090 where I have a good trade. > > > > > > > > How do I know which one is hit first? The low of the bar or the Buy > Stop? Or > > other possibilities? How can I accurately write AFL to track if my > entry is > > handled accurately? > > > > > > > > There are many possibilities inside the next 30-minute bar, i.e. if > the low > > is reached first, I may have a good trade; if my entry is taken > first and > > then the low, I will be killed somewhere. Can I accurately know > what happen > > inside the 30-minute bar? Do I need to use a smaller timeframe, i.e. > > 1-minute? > > > > > > > > Please give me your advice. Thank you in advance. > > > > > > > > Clement > > > > > > __________ NOD32 2305 (20070601) Information __________ > > This message was checked by NOD32 antivirus system. > http://www.eset.com >
