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

RE: [amibroker] Help to translate into AFL



PureBytes Links

Trading Reference Links










I am a bit confused about the second
signal. The first is easy enough

Val1 = valuewhen(x,h);

Val2 = valuewhen(ref(Val1,-1),H);

Buy = Cross(c,Val1-1) or Cross(c,Val2-1);
//assume 1 trade tick is value 1 and the trigger is close equal or crossing the
Val1 

Sell = y;

 

But when you say take the next bars high
if the original is not met, which next bar do you mean? You could only use it
as an either or for the buy statement.

There is no way of knowing if the first
condition will not be met, unless you have a time factor for which the original
buy remains current. Maybe someone else might work that bit out.

 

 





<span
>Cheers,

<span
 >Graham





 

<span
>-----Original Message-----
From: kk2628
[mailto:kk2628@xxxxxxxxxxxxxxxx] 
Sent: Thursday, 6 February 2003
5:57 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Help to
translate into AFL

<font size=2
face="Times New Roman"> 



<span
>Hi,





<font size=2
face="Times New Roman"> 





<span
>I am stuck. Wud greatly appreciate
someone can help to translate the following trading rules into AFL:





<font size=2
face="Times New Roman"> 





<span
>When x condition is met, store the
value of the bar's high. 





<span
>Buy when the bar's high value is
met, otherwise take the following bar's high as the new value, until buy (hit
the new bar's high value) or until y condition is met (signal reset).





<font size=2
face="Times New Roman"> 





<span
>many thanks





<span
>KK



<font size=2
face="Times New Roman">



Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx <font
face="Courier New">
(Web page: <a
href="">http://groups.yahoo.com/group/amiquote/messages/)

Check group FAQ at: <a
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html


Your use of Yahoo! Groups is subject to the <a
href="">Yahoo! Terms of Service.











Yahoo! Groups Sponsor


  ADVERTISEMENT  









Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.