Thanks Tomasz...
--- In [email protected], "Tomasz Janeczko" <[EMAIL PROTECTED]> wrote: > > Hello, > > In that case take a look at files section: > http://finance.groups.yahoo.com/group/amibroker/files/ > > there is "TradeSimFns(rev 1.5).zip" file that does what you are after > (i.e. generates TradeSim signal file from AB exploration). > > Best regards, > Tomasz Janeczko > amibroker.com > ----- Original Message ----- > From: "chorlton_c_hardy" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Sunday, February 17, 2008 6:39 AM > Subject: [amibroker] Re: Amibroker to TradeSim Code - Help Required Please!! > > > > Tomasz, > > > > I've only been using AB for a short while but believe it is indeed a > > superb product. I make reference to TradeSim as it has Monte Carlo > > capabilities. For the record, I purchased TradeSim at the same time > > that I was using Metastock for my charting. > > > > However, due to unresolved problems with MS, I made the switch to AB. > > As I already have TradeSim it makes sense (to me anyway) to continue > > to use it with AB. > > > > Regards.... > > > > --- In [email protected], "Tomasz Janeczko" <groups@> > > wrote: > >> > >> I wonder why you insist on using TradeSim while AB has way superior > > portfolio backtester with > >> features that Tradesim users can only dream about. > >> > >> Tradesim is for Metastock that does not have portfolio optimizer. > >> > >> Best regards, > >> Tomasz Janeczko > >> amibroker.com > >> ----- Original Message ----- > >> From: "chorlton_c_hardy" <chorlton-c-hardy@> > >> To: <[email protected]> > >> Sent: Thursday, February 14, 2008 11:38 AM > >> Subject: [amibroker] Re: Amibroker to TradeSim Code - Help Required > > Please!! > >> > >> > >> > Hi All, > >> > > >> > Just wanted to bump up this message to the top again just in case > >> > anyone can help me out with it. I've tried to resolve the issue > >> > myself but am getting strange results and consequently seem > > unable to > >> > find a solution. > >> > > >> > Any help or advice would be most welcome.... > >> > > >> > Thanks all, > >> > > >> > Chorlton > >> > > >> > --- In [email protected], "chorlton_c_hardy" <chorlton- c- > >> > hardy@> wrote: > >> >> > >> >> > >> >> Hello All, > >> >> > >> >> I've managed to find some code which allows me to export an > >> > Amibroker > >> >> Exploration File to TradeSim for further analysis. This code is > >> > posted > >> >> below: > >> >> > >> >> > >> >> > >> >> Buy = Ref(Buy,-1); Sell = Ref(Sell, -1); > >> >> > >> >> Cover = 0; Short = 0; > >> >> > >> >> TradeStop = LLV(Low,10); // Initial stop for TradeSim > >> >> > >> >> Equity( 1 ); // evaluates trades and stops > >> >> > >> >> Filter = Sell;// OR Cover; > >> >> > >> >> IsLong = Sell; > >> >> > >> >> dt = DateTime(); > >> >> > >> >> // Determine values for Explorer > >> >> > >> >> EntryDate = IIf( IsLong, ValueWhen( Buy, dt ), ValueWhen( Short, > >> > dt ) ); > >> >> > >> >> ExitDate = dt; > >> >> > >> >> EntryPrice = IIf( IsLong, ValueWhen( Buy, BuyPrice ), ValueWhen( > >> > Short, > >> >> ShortPrice ) ); // Set buy and sell prices to Open for TradeSim > >> >> > >> >> ExitPrice = IIf( IsLong, SellPrice, CoverPrice ); > >> >> > >> >> EntryLow = IIf( IsLong, ValueWhen( Buy, L ), ValueWhen( Short, > >> > L ) ); > >> >> > >> >> EntryHigh = IIf( IsLong, ValueWhen( Buy, H ), ValueWhen( Short, > >> > H ) ); > >> >> > >> >> EntryVolume = IIf( IsLong, ValueWhen( Buy, Ref(V,-1) ), ValueWhen > > ( > >> >> Short, Ref(V, -1) ) ); > >> >> > >> >> InitialStop = IIf( IsLong, ValueWhen( Buy, TradeStop ), ValueWhen > > ( > >> >> Short, TradeStop ) ); > >> >> > >> >> ExitLow = L; > >> >> > >> >> ExitHigh = H; > >> >> > >> >> SetOption("NoDefaultColumns", True ); > >> >> > >> >> AddTextColumn( Name(), "Symbol" ); > >> >> > >> >> AddColumn( IIf( IsLong, 76, 83 ), "Long/Short", formatChar ); // > > L > >> > or S > >> >> letter > >> >> > >> >> AddColumn( EntryDate, "EntryDate", formatDateTime); > >> >> > >> >> AddColumn( ExitDate, "ExitDate", formatDateTime); > >> >> > >> >> AddColumn( InitialStop, "Initial Stop", 1.3 ); > >> >> > >> >> AddColumn( EntryPrice, "EntryPrice", 1.3 ); > >> >> > >> >> AddColumn( ExitPrice, "ExitPrice", 1.3 ); > >> >> > >> >> AddColumn( EntryLow, "EntryLow", 1.3 ); > >> >> > >> >> AddColumn( EntryHigh, "EntryHigh", 1.3 ); > >> >> > >> >> AddColumn( L, "ExitLow", 1.3 ); > >> >> > >> >> AddColumn( H, "ExitHigh", 1.3 ); > >> >> > >> >> AddColumn( EntryVolume, "EntryVolume", 0.0); > >> >> > >> >> > >> >> > >> >> Unfortunately, this code seems to work for LONG trades only. > >> >> Consequently, does anyone know how I can modify it to include > > SHORT > >> >> trades? > >> >> > >> >> I have tried to modify it myself but have run into all kinds of > >> > problems > >> >> such as incorrect price data, missing price data, etc, etc. > >> >> > >> >> So far I have made the following changes (which may or may not be > >> >> right): > >> >> > >> >> Cover = Ref(Cover , -1); Short = Ref(Short,-1); (2nd line > > of > >> > code) > >> >> > >> >> Filter = Sell OR Cover ; (5th line of code) > >> >> > >> >> In addition, does anyone know how I can incorporate TWO Initial > >> > Stops > >> >> into the same system (1 Stop for LONG Trades and 1Stop for SHORT > >> > Trades) > >> >> so that AB & TradeSim know which stop to use depending on > > whether > >> > the > >> >> trade is LONG or SHORT?? > >> >> > >> >> For the system above, the initial stop for Short trades would > >> > be: > >> >> TradeStop = HHV(High,10); > >> >> > >> >> > >> >> > >> >> Any help much appreciated as I'm not sure how to proceed, > >> >> > >> >> > >> >> > >> >> Thanks > >> >> > >> >> Chorlton > >> >> > >> > > >> > > >> > > >> > > >> > 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 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 > >> > > >> > > >> > > >> > > > > > > > > > > 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 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 > > > > > > >
