Ciao Angelo, thanks for your reply.
> So I'd take the chance to ask more knowledgeable people: is the > priority order of the stop you referred above applied just by the > APPLYSTOP command (to which is directed your link)? I'm not that expert about AB but it seems like that priority order applies to APPLYSTOP only as per the user's guide > Should that be the case, you could try to code your several stops > within a loop (there are some examples in the tutorial and in the > kwowledge base). That's what I must do...but it's much more complex than switching on/off some properties. > In general, Amibroker doesn't deal in the Tradestation way's with > orders on the same bar (that's a nuisance for me too, having used TS > for quite a lot), so - when it is possible - I'd better avoid to have > two orders on the same bars. > > > PS Anyway, the "look inside the bar" of TS2000i requires to have an > intraday database from which to build daily bars (without intraday, > how could be possible to look inside a bar of greater time frame?), so > it really comes back to use multiple time frames in AB. That's correct...but again the code becomes much more complex Thanks, PC --- In [email protected], "Angelo" <[EMAIL PROTECTED]> wrote: > > --- In [email protected], "Paolo Cavatore" <pcavatore@> wrote: > > > > Has anyone of you ever come across the problem of properly backtesting > > stop-loss orders at intraday level in order to get the correct High-Low > > sequence within daily bars? > > > > > > > > This is a key point when you want to run reliable backtests on daily > data > > with a take-profit level and a stop-loss order. You must know which > of the > > two exit orders is hit first and you need intraday data for that. > > > > > > > > I'm referring to features like Look-inside-bar or PrecisionTick in other > > softwares in order to let built-in stops working at lower timeframes > and get > > the correct exit level. > > > > > > > > Unfortunately with AB if two or more different stops are triggered > on the > > very same bar then they are evaluated in this fixed order > > > > (see http://www.amibroker.com/guide/afl/afl_view.php?id=20): > > > > > > > > Fixed Ruin stop (loosing 99.96% of the starting capital) > > > > Max. loss stop > > > > Profit target stop > > > > Trailing stop > > > > N-bar stop > > > > > > > > which is a sort of worst-case scenario but it's not properly > reflecting the > > real-world and it's particularly misleading if you need stop-level > > optimization. > > > > > > > > The only way I can imagine to sort this out with AB is to use two > timeframes > > together - intraday as a base frame and daily via TimeFrameSet for > my Entry > > signals. With this technique I can have all my signals based on daily > > indicators and use intraday frame only for stops. > > > > > > > > Unfortunately this makes the code more complex and the cost of a proper > > intraday database is much higher. > > > > > > > > Has anyone of you found other shortcuts to accomplish that? > > > > > > Ciao Paolo, > > yesterday I wrote an answer, and then delete it, because I'm not sure > (someone might have received it by e-mail). > > So I'd take the chance to ask more knowledgeable people: is the > priority order of the stop you referred above applied just by the > APPLYSTOP command (to which is directed your link)? > > Should that be the case, you could try to code your several stops > within a loop (there are some examples in the tutorial and in the > kwowledge base). > > In general, Amibroker doesn't deal in the Tradestation way's with > orders on the same bar (that's a nuisance for me too, having used TS > for quite a lot), so - when it is possible - I'd better avoid to have > two orders on the same bars. > > > PS Anyway, the "look inside the bar" of TS2000i requires to have an > intraday database from which to build daily bars (without intraday, > how could be possible to look inside a bar of greater time frame?), so > it really comes back to use multiple time frames in AB. >
