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

Re: [amibroker] programming 101



PureBytes Links

Trading Reference Links

Sidney,

I´m in a little hurry so I just have had a chance to glance over your email.

I´m a  trader as well and thus sometimes have a hard time figuring out a
code that others can program on the fly.

As to questin number three, consider sum() and cum() functions.
The main difference between them is basically that in sum() function you
have to specify the range of bars or else it should count. Cum() basically
counts all occurrences by default, if not specified otherwhise.

As to resetting a counter, I´ll resend the amswers to my response from
Dimitris and Tomasz.

Again, I´m not a good programmer either but if I can somehow be of
assistance - let me (and the others) know.

Cheers

Markus
----- Original Message -----
From: "Sidney Kaiser" <s9kaiser@xxxxxxxxxxx>
To: <AmiBroker@xxxxxxxxxxxxxxx>
Sent: Friday, May 16, 2003 8:07 PM
Subject: [amibroker] programming 101


> Still struggling with trying to convert that Tradestation script....  ;(
>
> A few basic elements seem to crop up over and over again.  The problem is
I
> am a trader not a programmer, and I spend huge amounts of time spinning my
> wheels trying to generate or adapt code to do fairly simple tasks.  Here
> are a couple samples.
>
>
> (1)  IF condition then a=b // trying to use IIF , would that be: a =
> IIF(condition, b, a);  ie: the true condition has a new value but ?? on
the
> value to be used for the false condition.
>
>
> (2)  IF condition then a=c  // Where the value for "a" needs to persist
> until it is changed by the program.  Does that involve the use of
> ValueWhen(condition, c);   and I would think that the condition needs to
> change to a cross  function to pick up the first value where condition is
> true.  Multi part question I guess, but the details are important to poor
> programmers like myself.
>
>
> (3)  How do I set up a counter in AFL to keep track of the number of
> occurrences of some condition.
> IF condition then increment counter // Again the value of the counter
> needs to persist until it is used perhaps many bars later and then is
> probably reset.
>
> TIA
> Sid
>
>
>
>
> Send BUG REPORTS to bugs@xxxxxxxxxxxxx
> Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
> -----------------------------------------
> 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 http://docs.yahoo.com/info/terms/
>
>


----------------------------------------------------------------------------
----


>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.481 / Virus Database: 277 - Release Date: 5/13/2003
>


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading!
Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/aM1XQD/od7FAA/uetFAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
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 http://docs.yahoo.com/info/terms/