PS = MS = x assigns x to PS and MS. PS = MS == x assigns True to PS if MS equals x, and False otherwise.
-----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of thomasdrewyallop Sent: Friday, November 30, 2007 1:30 PM To: [email protected] Subject: [amibroker] Re: Any hints as to why this AFL will not backtest? Made the change but it still does not backtest. Thank you. Drew Yallop --- In [email protected], "bsvancara" <[EMAIL PROTECTED]> wrote: > > PositionSize = MarginDeposit = 1; ..... This is the error. > Try this: > PositionSize = MarginDeposit == 1; //Double equal sign > or > something like: PositionSize = -10; > > > --- In [email protected], "thomasdrewyallop" <drewyallop@> > wrote: > > > > _SECTION_BEGIN("Entropy Bot"); > > SetChartOptions( 0, chartShowDates|chartWrapTitle ); > > GraphXSpace=10; > > _N(Title = "{{NAME}} - {{INTERVAL}} {{DATE}} "+_DEFAULT_NAME()+" : > > {{OHLCX}} {{VALUES}}" ); > > Filter = 1; > > PositionSize = MarginDeposit = 1; > > LogReturn = LN(Close / Ref(C, -1)); > > AvgLogReturn = MA(LogReturn, 4 ); > > SquaredLogReturn = LogReturn ^ 2; > > //Root mean squares > > RMS = (Sum (SquaredLogReturn, 4 )/ 4 ) ^ 0.5; > > //Shannon's probability, i.e. the probability that next day's close will > > increase > > p = ((AvgLogReturn / RMS) + 1)/ 2; > > FirstSmoothing = MA(P,5); > > SSFast= MA(FirstSmoothing,7); > > SSSlow = MA(FirstSmoothing,9); > > Buy = Cross (SSSlow, SSFast); > > Sell = Cross (SSFast, SSSlow); > > Cover = Cross (SSSlow, SSFast); > > Short = Cross (SSFast, SSSlow); > > > > > > AddColumn (Close, "Close", 1.4); > > AddColumn (FirstSmoothing , "FirstSmoothing ", 1.4); > > AddColumn (SSFast, "SSFast", 1.6); > > AddColumn (SSSlow, "SSSlow", 1.6); > > AddColumn (Buy, "Buy", 1.0); > > AddColumn (Sell, "Sell", 1.0); > > AddColumn (Short, "Short", 1.0); > > AddColumn (Cover, "Cover", 1.0); > > > > AddColumn (RMS , "RMS", 1.6); > > AddColumn (P, "P", 1.6); > > Plot (SSFast, "SSFast", colorBlue,StyleLine|StyleOwnScale); > > Plot (SSSlow , "SSSlow ", colorBrightGreen,StyleLine|StyleOwnScale); > > Plot (c , "Close ", colorViolet,StyleLine|StyleOwnScale); > > PlotForeign ("DSE One BotEquity" , "DSE One BotEquity", colorRed, > > StyleLine|StyleOwnScale); > > > > > > _SECTION_END(); > > > 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
