PureBytes Links
Trading Reference Links
|
Final:
I have come to an explination:
Reserved Arrays clober
User arrays
on any subsequent calls to the same function.
Here is some code to show as an example:
Filter
=1;
function Any(array, period)
{
local LowValue;
//LowValue = LLV(array, period);
//ret = (100 * (array - LowValue) / (HHV(array, period) -LowValue));
}
Diff = Signal(12, 26, 9);
StochDiff = Any(Diff, 5); // 1st call
MyClose = Close;
JunkIgnored = Any(MyClose, 14); // 2nd call
JunkIgnored2 = Any(O, 14); // Reserved Array clobers User array
// On any subsequent calls.
AddColumn(C,"Close");
AddColumn(Diff,"Diff",1.4);
AddColumn(MyClose,"MyClose"); // Ends up being Open. (Clobered!)
AddColumn(O,"Open");
At 11:22 AM 4/02/2004, you wrote:
EDIT EDIT EDIT
Should have Read........
>I think you may be on the RIGHT track in regards to calling reserved
>variables.
Michael.
At 11:05 AM 4/02/2004, you wrote:
>I think you may be on the wrong track in regards to calling reserved
>variables.
>It looks like it's holding some value........Not sure though.
>
>Try this.
>Filter =1;
>function StochTransform(array, period)
> {
> local LowValue;
> LowValue = LLV(array, period);
> return (100 * (array - LowValue) / (HHV(array, period) -LowValue));
> }
>
>Diff = Signal(12, 26, 9);
>//StochDiff = StochTransform(Diff, 5); // Calling this 1st....
>JunkIgnored = StochTransform(C, 14); // CHANGES Diff.
>//JunkIgnored = StochTransform(Diff, 14); // Calling after Doesn't.
>AddColumn(C,"Close");
>AddColumn(Diff,"Diff",1,4);
>
>
>
>
>
>At 08:02 AM 4/02/2004, you wrote:
>>Dave - just a quick reply FYI. I wasn't implying a stack overflow.
>>My wildass guess was that pointers to parm vectors were being passed
>>on the stack along with a result pointer, and that the call stack
>>became unbalanced and an input pointer was being used for a result
>>pointer. Anyway, Tomasz will let us know, but it looks like it is a
>>problem.
>>
>>-- Bruce
>>
>>
>>--- In amibroker@xxxxxxxxxxxxxxx, "Dave Merrill"
>>wrote:
>> > Thanks for your further investigations, good work. Interesting that
>>it's
>> > only direct uses of the reserved variables that causes this.
>>Besides your
>> > stack overflow idea, maybe there's an issue with how input
>>parameters are
>> > handled. I'd think stack issues would affect any repeated call to
>>the
>> > function, regardless of what the input vars were, but of course I
>>don't have
>> > much context for even guessing.
>> >
>> > I did write Tomasz, haven't heard back, we'll see what he says.
>> >
>> > Thanks again for checking, glad to know I'm not just completely
>>losing it
>> > over here. I think...
>> >
>>
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
Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|