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

[amibroker] REPETITIVE CODING



PureBytes Links

Trading Reference Links





I have posted so many questions to this 
board that I  feel that  I owe you all an apology. 
I think that a short explanation of my 
experience level will be helpful to those brave souls who are willing to 
graciously post answers to my seemingly endless questions. 
BTW, I think that TJ deserves some sort 
of Nobel Prize  for this software that is providing me 
with  a very enjoyable 
experience.      Maybe they need to introduce 
 a new prize for Greatest Software.  
I have an OK understanding of the 
behavior of an individual stock.  However, I am still in the dark 
ages when it comes to 
 understanding how software, and computers work. What I am asking below may 
be easy to do by using Textpad, and the formula.php file that Dingo placed in 
the AFL library. 
I am  thoroughly enjoying running 
the few SCANS that I have developed. This makes it even more difficult 
 for me to divert a lot of time to reading the incomprehensible (to me) 
HELP files of Textpad.  I did read some  in Textpad's 
HELP section, but I find it 
very difficult to understand what it is saying. I don't even know if Textpad 
is smart enough to pick up the scent of Dingo's formula.php, in order 
to know to automatically go and fetch it.  <FONT face=Arial 
color=#000000 size=4>Now, lets get to the meat of this post. 
 I have finally learned to create 
a few SCANS that work.  All of these SCANS have a lot of repetition in 
the coding. In smaller type below, I have explained the purpose of 
this post.  
 
I <FONT face=Arial 
color=#000000 size=2> want to test a very large number of 
the AFL functions OBV(),  RSIa(), PDI(), etc, in many different ways. 
 I have already tested a couple of these  AFL functions 
in an  AA  SCAN, that I designed.    I now 
want to test many more of these AFL functions using  a lot of 
different variations of the very repetitive  AA SCAN that I 
developed.    I downloaded the formula.php file that Dingo 
developed, and I also downloaded Textpad.  Maybe this combination of 
Textpad and formula.php will be able to do what I am wanting 
to accomplish.   Another thought I had is that perhaps the PARAM 
function would be a way to do what I want to do.  I only have a vague idea 
of what can be accomplished with PARAM.   My understanding of how 
PARAM works is that you can right click on it, and it will present you with a 
menu that allows you to choose other variables to apply to  whatever it is 
that the PARAM is programmed to do.
Finally, directly below, I used AA to 
create an explanation of just exactly what it is that I want to 
accomplish.
//This is an example of the kind of AFL coding 
template that I would like to 
have.
afl1=(my <FONT 
face="Courier New" color=#ff00ff size=1>1<FONT face="Courier New" 
size=1>st Choice); //this <FONT 
face="Courier New" color=#008000 size=1>is the #1<FONT color=#008000 
size=1> item to be 
automatically inserted in the proper place below. It can be any AFL function, or 
any combination of <FONT 
face="Courier New" color=#008000 size=1>functions,<FONT color=#008000 
size=1>identifiers<FONT face="Courier New" color=#008000 
size=1>, and operators
Condbuy1=  //this 
is the 1st <FONT 
color=#008000 size=1><FONT face="Courier New" color=#008000 
size=1>buy<FONT face="Courier New" 
color=#008000 size=1> requirement, 
and<FONT 
color=#008000 size=1> it 
will be <FONT face="Courier New" 
color=#008000 size=1>the 1st <FONT 
face="Courier New" color=#008000 size=1>of 
many b<FONT 
color=#008000 size=1>uy <FONT face="Courier New" color=#008000 
size=1>requirements that have a lot of repeating groups within it.The line 
directly below is an example of a repeating pattern.<FONT color=#008000 
size=1> 
Ref(afl1,-<FONT color=#ff00ff 
size=1>1) <= <FONT color=#0000ff 
size=1>Ref(afl1,-<FONT color=#ff00ff 
size=1>2) AND <FONT 
color=#0000ff size=1>Ref(afl1,-<FONT 
color=#ff00ff size=1>2) <= <FONT 
color=#0000ff size=1>Ref(afl1,-<FONT 
color=#ff00ff size=1>3) AND 
Ref<FONT color=#000000 
size=1>(afl1,-3<FONT color=#000000 
size=1>) <=....;     <FONT color=#008000 
size=1>//I deliberately 
positioned         
Condbuy1=      by itself, immediately above the rest of 
the repetitive coding. This makes it easier to make the many identical logical 
operators line up in the same vertical column.<FONT 
size=1>
afl2=(my 2<FONT 
face="Courier New" size=1>nd Choice); <FONT face="Courier New" 
color=#008000 size=1>// this is the #2 item to be automatically 
inserted.........
Condbuy2=//this is the 
2nd Buy Condition, and it will be the 2nd of many.......... <FONT 
size=1>
Buy=Condbuy1 AND Condbuy2 AND Condbuy3 AND 
.......;
// The same kind of system is used to produce the sell requirements 

Sell=Condsell1 AND Condsell2 AND Condsell3 
AND.....;
I am looking foreward to hearing from 
anyone who understands what I want to do here.   Ron 
D
 <FONT 
face="Courier New" size=1>






Yahoo! Groups Sponsor


  ADVERTISEMENT 









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 the Yahoo! Terms of Service.