Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
OK. I can reasonably safely say the problem is not with the external function, but it does raise the question of why you are using it at all?
x1:=ExtFml("Forum.Sum",x1,1);
x2:=ExtFml("Forum.Sum",x2,1);
x3:=ExtFml("Forum.Sum",x2,300);
The Forum sum is designed for variable time periods. As you have static periods, you can just use the Sum(x,y) function from the native MS Formula Language.
The next point which escaped my attention previously is that you are summing a data array over one period, which simply returns the data array itself!
x1:=Security("C:\\METASTOCK DATA\\.DJI",C);
x2:=Security("C:\\METASTOCK DATA\\US STOCKS\\C - D\\DIA",C);
x1:=ExtFml("Forum.Sum",x1,1);
x2:=ExtFml("Forum.Sum",x2,1);
x3:=ExtFml("Forum.Sum",x2,300);
is the same as:
x1:=Security("C:\\METASTOCK DATA\\.DJI",C);
x2:=Security("C:\\METASTOCK DATA\\US STOCKS\\C - D\\DIA",C);
x3:=Sum(x2,300);
No?
Not making to calls to external functions wll also speed up the processing of the indicator!
We haven't solved the original problem, yet, but the more we simplify the code, the easier it will be to find where the real problems lie.
wabbit :D
|