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

Re: [amibroker] Re: can anyone help me in coding AFL



PureBytes Links

Trading Reference Links

Have you looked at the code in the library?
----- Original Message -----
From: rasepi
Sent: Wednesday, November 02, 2005 1:11 PM
Subject: [amibroker] Re: can anyone help me in coding AFL

hello
i am not interested on the MA
(i am not a idiot, i believe)
my project is to code steve woods float channel indicator
i have made a code with VBscript
its working but its very slow
i tried it in AFL langage buts it no working
therefore i have tried coding a simple moving average to learning
buts also no working
if you are a professional programmer, can you explain what is false in
this following code?

f=15;
for (i=15 ;i<BarCount -1 ;i++);
{ //begin for loop
n=0;
temp=0;
while (temp < f-1)
{ //begin while loop
temp= temp+ C[i-n];
n=n+1;
} //end while loop
a[i]=temp/15;
} //end for loop

Graph0=a;







--- In amibroker@xxxxxxxxxxxxxxx, "Dan Clark" <dan_public@xxxx> wrote:
>
> Unless I'm missing something, I strongly second Chuck's suggestion -
use the
> MA function.   Assuming that you have the latest beta version:
>

>
> 1. Open a chart.
>
> 2. Select "View --> Charts" to ensure that you have the Charts table
> visible.
>
> 3. Click on "Averages" to expand it.
>
> 4. Click on "MA - Simple Moving Averages".
>
> 5. Right-click and select "Overlay".  This will overlay the MA on your
> chart.
>
> 6. Right-click on the chart, select "Edit formula".
>
> 7. At the bottom, you will see a new section labeled "MA".  It will
show the
> code that computes and plots the MA.
>

>
> You said that you wanted to learn programming.  I AM a programmer
> professionally.  I've been writing code since 1971.   (Currently I'm a
> contract database developer.)  Based on decades of programming and
about six
> months programming AmiBroker, here are some STRONG suggestions:
>

>
> - Forget VBScript and any other procedural language for a while.   In
> AmiBroker, NEVER use looping, procedural code unless absolutely
necessary.
> AmiBroker is an array-processing engine.   Learn how it works. 
Don't fight
> it.   
>

>
>  Start with the Help file and look at the Tutorials, especially the
> "AmiBroker Formula Language" tutorials.
>

>
> - Always use native internal AmiBroker functions if they are available.
> (You'll still have plenty to code anyway.)
>

>
> - Learn from the MA Code inserted in your chart.  Look at it
carefully and
> understand what each parameter does.  Play with each parameter and
watch the
> effect it has.  That's the fasted way to learn AmiBroker coding.
>

>
> IF and ONLY IF you don't get the results you want when you have
applied the
> three rules above, then you turn to alternative methods (such as
VBScript
> looping).
>

>
> Regards,
>

>
> Dan.
>

>
> p.s., In case you are wondering, I started programming VB at Version
1.0 in
> 1992.  I've programmed every version since then including VB.Net. 
In other
> words, I could easily write VBScript code in AmiBroker, but I still
strongly
> recommend against it except as a last resort.
>

>

>

>
>   _____ 
>
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]
On Behalf
> Of Chuck
> Sent: Wednesday, November 02, 2005 3:51 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: Re: [amibroker] can anyone help me in coding AFL
>

>
> Why don't you just use the MA function?  See the help file.
>
>
> ----- Original Message -----
> From: "rasepi" <rasepi@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Wednesday, November 02, 2005 5:46 AM
> Subject: [amibroker] can anyone help me in coding AFL
>
>
> > f=15;
> > for (i=15  ;i<BarCount -1 ;i++);
> > {n=0;
> > temp=0;
> > while (temp < f-1)
> >  {
> > temp= temp+ C[i-n];
> >     n=n+1;
> > }
> > }
> > a[i]=temp/15;
> > Graph0=a;
> >
> > in this formula what is false
> > my project is to coding a simple moving average of 15 days
> > the graph shows only the last value of the average
> >
> > thanks for help
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > 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 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 other support material please check also:
> http://www.amibroker.com/support.html
>
>
>
>
>
>
> SPONSORED LINKS
>
>
> Investment
>
<http://groups.yahoo.com/gads?t=ms&k=Investment+management+software&w1=Inves
>
tment+management+software&w2=Real+estate+investment+software&w3=Investment+p
>
roperty+software&w4=Software+support&w5=Real+estate+investment+analysis+soft
>
ware&w6=Investment+analysis+software&c=6&s=209&.sig=7eLbIobNLPiaCdUon6xw5w>
> management software
>
> Real
>
<http://groups.yahoo.com/gads?t=ms&k=Real+estate+investment+software&w1=Inve
>
stment+management+software&w2=Real+estate+investment+software&w3=Investment+
>
property+software&w4=Software+support&w5=Real+estate+investment+analysis+sof
>
tware&w6=Investment+analysis+software&c=6&s=209&.sig=qVIy7aeMM52465dBhias7w>
> estate investment software
>
> Investment
>
<http://groups.yahoo.com/gads?t=ms&k=Investment+property+software&w1=Investm
>
ent+management+software&w2=Real+estate+investment+software&w3=Investment+pro
>
perty+software&w4=Software+support&w5=Real+estate+investment+analysis+softwa
>
re&w6=Investment+analysis+software&c=6&s=209&.sig=lHCxQveBvqqJN_C2-8J8yw>
> property software
>
>
> Software
>
<http://groups.yahoo.com/gads?t=ms&k=Software+support&w1=Investment+manageme
>
nt+software&w2=Real+estate+investment+software&w3=Investment+property+softwa
>
re&w4=Software+support&w5=Real+estate+investment+analysis+software&w6=Invest
> ment+analysis+software&c=6&s=209&.sig=-fzwVY_vCOoY7G2TwUPN7w>  support
>
> Real
>
<http://groups.yahoo.com/gads?t=ms&k=Real+estate+investment+analysis+softwar
>
e&w1=Investment+management+software&w2=Real+estate+investment+software&w3=In
>
vestment+property+software&w4=Software+support&w5=Real+estate+investment+ana
>
lysis+software&w6=Investment+analysis+software&c=6&s=209&.sig=2hBKzxWX871GuN
> wCwK7E_Q>  estate investment analysis software
>
> Investment
>
<http://groups.yahoo.com/gads?t=ms&k=Investment+analysis+software&w1=Investm
>
ent+management+software&w2=Real+estate+investment+software&w3=Investment+pro
>
perty+software&w4=Software+support&w5=Real+estate+investment+analysis+softwa
>
re&w6=Investment+analysis+software&c=6&s=209&.sig=tdsnvsyEa54tWePPTX538Q>
> analysis software
>

>
>   _____ 
>
> YAHOO! GROUPS LINKS
>

>
> *      Visit your group "amibroker
> <http://groups.yahoo.com/group/amibroker> " on the web.
>  
> *      To unsubscribe from this group, send an email to:
>  amibroker-unsubscribe@xxxxxxxxxxxxxxx
> <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>
>  
> *      Your use of Yahoo! Groups is subject to the Yahoo!
> <http://docs.yahoo.com/info/terms/>  Terms of Service.
>

>
>   _____
>





No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.12.7/154 - Release Date: 11/01/05


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 other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment analysis software


YAHOO! GROUPS LINKS