[amibroker] Simple Code Difficulty

2010-06-08 Thread abramway
I'd just like to be able to get signals for Buy: When EMA(5)EMA(20) AND Stock @ Fresh 20-Day Highs. Exit: When EMA(20)EMA(5) OR Stock @ Fresh 10-Day Lows (haven't incorporated the second part yet) This is what my code reads now and its giving me the wrong signals. It gives me BUY signals

Re: [amibroker] Simple Code Difficulty

2010-06-08 Thread Howard B
Here is the Buy part with plot statements to help visualize what is happening - //Buy20DayHigh.afl // //Buy when ema(c,5) ema(c,20) //and issue reached new 20 day high // //Howard Bandy //June 2010 // Cond1 = EMA( C, 5 ) EMA( C, 20 ); Cond2 =

[amibroker] Simple code

2008-03-03 Thread bernardedmond01
Hi I've just come back to using Amibroker after my laptop was stolen (ouch!) and I've lost some of my codes (although most of it was backed up). I'm really rusty on AFL. Would someone mind coding this simple piece for me? Based on Williams and Bernstein-type breakouts. 1. Calculate yesterday's

[amibroker] Simple code

2008-02-26 Thread Louis Préfontaine
I give up... Tried everything I could, but really I can't do it. ( exit == 1 AND Close[i] EMA (Close[i],50) ) I want to a close that is lower than ema 50 close of [i]. That shouldn't be that complicated! Grrr...! If anyone can help. Thanks, Louis

[amibroker] Simple code is not working,,,

2006-12-21 Thread chugunok
Hi Folks, I am learning AFL, and tried to implement a simple strategy: Buy when price drops 3% below yesterday's close Sell when it is 3% above the purchase price Here is the code: BuySignal = ( Close - Ref(Close, -1) ) / Close; SellSignal = (Close-BuyPrice) / Close; Buy = BuySignal -0.03;

RE: [amibroker] Simple code is not working,,,

2006-12-21 Thread Thomas Z.
@yahoogroups.com Subject: [amibroker] Simple code is not working,,, Hi Folks, I am learning AFL, and tried to implement a simple strategy: Buy when price drops 3% below yesterday's close Sell when it is 3% above the purchase price Here is the code: BuySignal = ( Close - Ref(Close, -1) ) / Close

Re: [amibroker] Simple code problem

2006-03-26 Thread Tomasz Janeczko
uot;Style")); Best regards,Tomasz Janeczkoamibroker.com - Original Message - From: Rush To: amibroker@yahoogroups.com Sent: Sunday, March 26, 2006 9:18 AM Subject: [amibroker] Simple code problem Hi, This is my first attempt at using the built in langua

RE: [amibroker] Simple code problem

2006-03-26 Thread Rush
] On Behalf Of Tomasz Janeczko Sent: 26 March 2006 11:49 To: amibroker@yahoogroups.com Subject: Re: [amibroker] Simple code problem Hello, You are trying to write loop code but you are using array functions (i.e. Ref). This does not make too much sense. If you are writing looping

Re: [amibroker] Simple code problem

2006-03-26 Thread Tomasz Janeczko
ot;MA Candlesticks", colorBlack, styleCandle ); Best regards,Tomasz Janeczkoamibroker.com - Original Message - From: Rush To: amibroker@yahoogroups.com Sent: Sunday, March 26, 2006 12:33 PM Subject: RE: [amibroker] Simple code problem Hi Tomasz,

RE: [amibroker] Simple code problem

2006-03-26 Thread Rush
Title: Simple code problem Thank you very much From: amibroker@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tomasz Janeczko Sent: 26 March 2006 17:17 To: amibroker@yahoogroups.com Subject: Re: [amibroker] Simple code problem Hello, Q. So every

[amibroker] Simple code problem

2006-03-25 Thread Rush
Title: Simple code problem Hi, This is my first attempt at using the built in language to program. I wrote the code below, a simple moving average, which looks correct but only works correctly when Periods has a value of 3. Any other value and the resulting line has a much greater value