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

RE: [amibroker] Re: opt this



PureBytes Links

Trading Reference Links


Greg, Terry: I 
started to try this one but stopped because of other pressing 
tasks.
<SPAN 
class=700430619-27042002> 
My approach was 
going to be to make a bunch of lines and have a logic comparison in them that 
would zero when not true and the zero would mulitply out to make the line 
zero.
<SPAN 
class=700430619-27042002> 
So a line like 
this:
<SPAN 
class=700430619-27042002> 
<SPAN 
class=700430619-27042002>Min(Ref(L,-9)*(pds>=9) + (pds>=9)*Plusval* 
LinRegSlope(L, pds);
<SPAN 
class=700430619-27042002> 
If pds= 8, then 
the entire line above evaluates to Min(   ) * 0 + 
0*Plusval*LinReg..  all = 0
<SPAN 
class=700430619-27042002> 
If pds= 9 or 
above, then the line would calculate as expected.
<SPAN 
class=700430619-27042002> 
Do youthink this 
would work??
<SPAN 
class=700430619-27042002> 
Ken 
       
<SPAN 
class=700430619-27042002> 
<FONT face=Tahoma 
size=2>-----Original Message-----From: greg 
[mailto:greg.bean@xxxx]Sent: Saturday, April 27, 20022:16 
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: Re: [amibroker] 
Re: opt this
Terry,
 
Sorry, but I think the Plusval suggestion I made is 
a dud. You seem to need to be able to alter the number of lines according to the 
pds value. I'm stuck on that one.
 
Greg
 
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
<A href="" 
title=greg.bean@xxxx>greg 
To: <A 
href="" 
title=amibroker@xxxxxxxxxxxxxxx>amibroker@xxxxxxxxxxxxxxx 
Sent: Saturday, April 27, 2002 2:30 
PM
Subject: Re: [amibroker] Re: opt 
this

Terry,
 
Just an after thought. Maybe try it first with 
the green colored lines in the code. You will have to play around with ita 
bit. Just try a few things and see what happens.
 
Greg
 
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
<A href="" 
title=greg.bean@xxxx>greg 
To: <A 
href="" 
title=amibroker@xxxxxxxxxxxxxxx>amibroker@xxxxxxxxxxxxxxx 
Sent: Saturday, April 27, 2002 2:23 
PM
Subject: Re: [amibroker] Re: opt 
this

Terry,
 
I don't know if this will work, but itwon't 
hurt to try.
 
Plusval=pds-1
 
There's probably something a lot shorter that 
will get the job done. I'm new at this . Hmmm, I think I might have 
something now.
comes to 6 lines of code if you deletethe 
green lines . They all seem 
to repeat each other except for minus value after L,  
.
 
 
Greg
<FONT 
face="Courier New"> //pds=optimize("pds,14,1,60,1); //pds=14;
  <FONT 
face="Courier New" size=3>Plusval=pds-1; Min(L, 
Min(Ref(L,-1) +Plusval* LinRegSlope(L, pds), Min(Ref(L,-Plusval) 
+Plusval* LinRegSlope(L, pds),       
Min(Ref(L,-3) +Plusval* LinRegSlope(L, 
pds),       Min(Ref(L,-4) +Plusval* 
LinRegSlope(L, pds),       Min(Ref(L,-5) 
+Plusval* LinRegSlope(L, pds),       
Min(Ref(L,-6) +Plusval* LinRegSlope(L, 
pds),       Min(Ref(L,-7) +Plusval* 
LinRegSlope(L, pds),       Min(Ref(L,-8) 
+Plusval* LinRegSlope(L, pds),       
Min(Ref(L,-9) +Plusval* LinRegSlope(L, 
pds),       Min(Ref(L,-10) +Plusva* 
LinRegSlope(L, pds),       Min(Ref(L,-11) 
+Plusval* LinRegSlope(L, pds),       
Min(Ref(L,-12) +Plusval* LinRegSlope(L, 
pds),       Ref(L,-13) 
+Plusval* LinRegSlope(L, pds))))))))))))));
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
<A href="" 
title=t.willett@xxxx>spxer 
To: <A 
href="" 
title=amibroker@xxxxxxxxxxxxxxx>amibroker@xxxxxxxxxxxxxxx 
Sent: Saturday, April 27, 20021:56 
PM
Subject: [amibroker] Re: opt 
this
Greg, the number of lines of code has to change as 
well. Ie: the lines where you see the +1 through +13 will change as 
the parameter changes. A 14 period indicator has 13 lines of code. A 3 
peroid indicator will have 2 lines of code.--- In <A 
href="">amibroker@xxxx..., "greg" <<A 
href="">greg.bean@xxxx...> wrote:> Hi, 
Terry,> > How about trying this.>  >When 
you want to optimize. Remove // in front of optimize line, but leave 
them in front of pds line. > > When you get your optimized 
value replace the // in front of the optimize line and remove them 
from the pds line.> > Greg> > 
+++++++++++++++++++++++++++++++++++++++++++++++> > 
//pds=optimize("pds,14,1,60,1);> //pds=14;> Min(L, 
Min(Ref(L,-1) +1* LinRegSlope(L, pds),> Min(Ref(L,-2) +2* 
LinRegSlope(L, pds),>      Min(Ref(L,-3) 
+3* LinRegSlope(L, pds),>       
Min(Ref(L,-4) +4* LinRegSlope(L, 
pds),>      Min(Ref(L,-5) +5* 
LinRegSlope(L, pds),>       
Min(Ref(L,-6) +6* LinRegSlope(L, 
pds),>       Min(Ref(L,-7) +7* 
LinRegSlope(L, pds),>      Min(Ref(L,-8) 
+8* LinRegSlope(L, pds),>       
Min(Ref(L,-9) +9* LinRegSlope(L, 
pds),>       Min(Ref(L,-10) +10* 
LinRegSlope(L, pds),>       
Min(Ref(L,-11) +11* LinRegSlope(L, 
pds),>       Min(Ref(L,-12) +12* 
LinRegSlope(L, pds),>       
Ref(L,-13) +13* LinRegSlope(L, pds))))))))))))));>   
----- Original Message ----- >   From: spxer 
>   To: amibroker@xxxx >   Sent: 
Saturday, April 27, 2002 12:40 PM>   Subject: [amibroker] 
Re: opt this> > >   This is only part of 
the formula. It is for a 14 period indicator. As >   
you can see the lines of code will change for every parameter input. 
>   This is known as projection bands by Mel Widner,it 
is included in  >   metastock. (coded: 
ProjBandBot(14) which makes it easy to optimize)<FONT face=Arial 
size=2>=============================   
CUT  ========================================= Your 
use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service. 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service. 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service.