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
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... ...
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...
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, 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...
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...
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...
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...
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 )...
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,...
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, 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, 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...
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 ...
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, 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...
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...
... 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") ...
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...
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...
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...
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)...
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...
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...
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...
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, 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 ); ... ...