[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Re: Why do I get "missing buy/sell variable assignmets" error?



PureBytes Links

Trading Reference Links

Hi - In AA settings, you probably have Positions set to "Long and Short" so AB is expecting to see Short and Cover defined. You could either change settings to Long only or add this to your code...
 
Short = Cover = 0;
 
Steve
----- Original Message -----
From: alta hob
Sent: Saturday, April 19, 2008 6:05 AM
Subject: Re: [amibroker] Re: Why do I get "missing buy/sell variable assignmets" error?

Thanks for your help.

I now get "missing short/cover variable assignment" after adding the Sell = 0; string

Going throught the amibroker documentation but appreciate any help while I am new to this.



On Sat, Apr 19, 2008 at 9:40 AM, jamesfarrow2003 <jamesfarrow2003@xxxxxxxxx> wrote:

I wouls just enter the line:

Sell = 0;

Then set your stops using the GUI or via code, whichever is desired.



--- In amibroker@xxxxxxxxxxxxxxx, "alta hob" <altahob@xxx> wrote:
>
> I`m trying to run this code as a simple backtest but get "missing
buy/sell
> variable assignmets" error. Have tried adding
>
> ApplyStop( stopTypeNBar, stopModeBars, 5 );
>
> but still get error. Can someone please advise what I need to do
to run
> as a simple backtest with a trailing bar stop?
>
> thanks
>
> altahob
> ----------
> /* Connors and Raschke Historical Volatility System
> For further explanation, refer to "Street Smarts"
> from Connors and Raschke.
> Ported from Metastock code by Daniel Ervi */
>
> numcolumns = 5;
>
> VolRatio = StDev(Log(C/Ref(C,-1)),5) / StDev(Log(C/Ref(C,-1)),99);
> column0 = VolRatio;
> column0name = "VolRatio";
>
> NR4Day = (H - L) < Ref(LLV(H-L,3),-1);
> column1 = NR4Day;
> column1name = "Nr4Day";
>
> InsideDay = H < Ref(High,-1) AND Low > Ref(Low,-1);
> column2 = InsideDay;
> column2name = "Inside Day";
>
> column3 = High + 0.125;
> column3name = "Buy Stop";
>
> column4 = Low - 0.125;
> column4name = "Sell Stop";
>
> filter = VolRatio < 0.5 AND (NR4Day == 1 AND InsideDay == 1);
>
> buy = filter;
>


__._,_.___

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




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___