Search the web
Sign In
New User? Sign Up
amibroker · AmiBroker User's List
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Re: opt this   Message List  
Reply | Forward Message #14253 of 143922 < Prev |
Re: [amibroker] opt this

Hi-
 
I'm not sure that I totally understand your question, but you can include up to 10 seperate calls to optimize function in your code...if that helps...
 
Steve
----- Original Message -----
From: spxer
Sent: Saturday, April 27, 2002 10:46 AM
Subject: [amibroker] opt this

Hi all. I am new to AB and I don't know how to proceed on this point.
I want to optimize an indicator in a system test. This indicator
requires a different length of code for each parameter setting. The
only way I know how to write it is as separate indicators. What can I
do to optimize? Thanks, Terry


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


Sat Apr 27, 2002 3:26 pm

djs44us
Offline Offline
Send Email Send Email

Forward
Message #14253 of 143922 < Prev |
Expand Messages Author Sort by Date

Hi- I'm not sure that I totally understand your question, but you can include up to 10 seperate calls to optimize function in your code...if that helps... ...
Steve Dugas
djs44us
Offline Send Email
Apr 27, 2002
3:26 pm

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...
spxer
Offline Send Email
Apr 27, 2002
3:40 pm

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...
greg
tedd2pumpkin
Offline Send Email
Apr 27, 2002
4:15 pm

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...
spxer
Offline Send Email
Apr 27, 2002
4:56 pm

Terry, I don't know if this will work, but it won't hurt to try. Plusval=pds-1 There's probably something a lot shorter that will get the job done. I'm new at...
greg
tedd2pumpkin
Offline Send Email
Apr 27, 2002
5:23 pm

Terry, Just an after thought. Maybe try it first with the green colored lines in the code. You will have to play around with it a bit. Just try a few things...
greg
tedd2pumpkin
Offline Send Email
Apr 27, 2002
5:30 pm

I tried coding John Ehler's Center of Gravity Indicator as published in TASC,May, 02, page 21. When you look back with "Ref" it works very well. However, how...
nkis22
Offline Send Email
Apr 27, 2002
5:44 pm

Here is the way , I coded it. T is the lookback period. The formula is, for those that don't have the magazine, CG = -Num/Denom; where Num = Sum of ( 1 + j )...
into_stocks98
Offline Send Email
Apr 27, 2002
6:10 pm

Mohan, yes you got it right. Thanks It works with any lookback period. Thanks also for commenting the script - I learnt from it. nand ... 15...
nkis22
Offline Send Email
Apr 27, 2002
6:20 pm

I don't see how that helps. Let me write 2 versions of the indicator for you to see. A 3 period and 5 period. 2 period Min(L, Min(Ref(L,-1) +1* LinRegSlope(L,...
spxer
Offline Send Email
Apr 27, 2002
6:17 pm

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...
greg
tedd2pumpkin
Offline Send Email
Apr 27, 2002
6:15 pm

Greg, Terry: I started to try this one but stopped because of other pressing tasks. My approach was going to be to make a bunch of lines and have a logic ...
Ken Close
ken45140
Offline Send Email
Apr 27, 2002
7:11 pm

Ken, I can't really profess to understand what the original code is doing, but isn't the Min function going to return a zero in your idea which will be the new...
spxer
Offline Send Email
Apr 27, 2002
7:50 pm

Terry: from a fast look, you may be right. I did not study the code enough to see that. Logic comparisons is a good way to zero out some portion of a ...
Ken Close
ken45140
Offline Send Email
Apr 27, 2002
8:13 pm

Hi Terry - Well, I'm just starting out in this stuff but it seems that the 'lines of code' in incremented by the 'input variable', i.e., 2,3,4, etc. This...
Lou Howard
loulh
Offline Send Email
Apr 27, 2002
9:14 pm

Lou, I don't know anything about VBscript. Thanks, Terry ... the 'lines of code' in incremented by the 'input variable', i.e., 2,3,4, etc. This sounds like a...
spxer
Offline Send Email
Apr 27, 2002
10:02 pm

Terry, have you heard the expression "Open mouth and insert foot"? Well, I just did it. I thought I'd write you a short code and solve all your problems but...
Lou Howard
loulh
Offline Send Email
Apr 27, 2002
11:39 pm

... mud-fish with advice on "for next loops" and or function calls from VBscript...>> In it's simplest form: // example in VBScript <% myArray = AFL("close") ...
Herman van den Bergen
vdbergen
Offline Send Email
Apr 28, 2002
1:48 am

Hi Herman, thanks for trying. What Terry is trying to do is actually append a section of code containing AFL functions to a prior line of code. The code to...
Lou Howard
loulh
Offline Send Email
Apr 28, 2002
5:00 am

Hey, Lou and Herman. I appreciate your help. It has gotten way over my capabilities. I read the help files on VBscripting, 2 times, and didn't understand a...
spxer
Offline Send Email
Apr 28, 2002
1:27 pm

Posted earlier, but may be useful again: For those interested in using the scripting capabilities of Amibroker, but do not know how scripting works, there are...
E Winters
raintree26
Offline Send Email
Apr 28, 2002
1:39 pm

is this similar to what you are asking. in the z= formula for every true it adds 1 to the projection band so if (IIf(L<Ref(L,- 1),1,0) +IIf(L<Ref(L,-2),1,0)...
nirvana1x
Offline Send Email
Apr 28, 2002
3:07 pm

I've tested this further and it seems o.k. in the indicator builder place this as the formula to test against the optimized formula to see if it does what you...
nirvana1x
Offline Send Email
Apr 28, 2002
3:41 pm

Nirvana, Unless I missunderstand what you have written (which would be easy for me),I don't think it would work. There are still 13 lines of code in the graph...
spxer
Offline Send Email
Apr 28, 2002
4:00 pm

Ed, thanks for the very useful pointer. It is now on my favorites list. My problem now is the interface between AFL and VBScript and only a matter of...
Lou Howard
loulh
Offline Send Email
Apr 28, 2002
7:33 pm

Hello, Here is a sample VBScript code that re-implements your code in that way that you can optimize your projected band formula: /* your original */ Graph0 =...
Tomasz Janeczko
amibroker
Offline Send Email
Apr 28, 2002
7:51 pm

Tomasz, This is sheer magic. You are a genius. I don't understand any of it, but it seems to work. Much thanks, Terry ... ( "param", 14, 5, 40, 1 ); ... ...
spxer
Offline Send Email
Apr 28, 2002
9:36 pm

Nice piece of code and why it doesn't work in jscript? EnableScript ( "jscript" ); bars = Optimize( "param", 14, 5,40, 1 ); LinReg=LinRegSlope( L, bars); <% ...
nenapacwanfr
Offline Send Email
Apr 29, 2002
2:46 pm

Hi, What is the purpose of this code with optimized period it seems it could make a good trailingstop stephane...
nenapacwanfr
Offline Send Email
Apr 30, 2002
8:07 am
First  | < Prev  |  Last 
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help