Error

 Previous Topic Next Topic
 Systematic #1 Posted : Monday, August 14, 2006 9:40:32 AM(UTC) Rank: MemberGroups: Registered, Registered Users, SubscribersJoined: 9/15/2005(UTC)Posts: 24 I am experiencing a curious situation when applying moving averages to custom indicators. Specifically, I obtain different results between the following two situations: 1) The custom indicator is applied to the closing price of a security by dragging from the indicator list to the stock chart and placing it into a new window; then applying the moving average by dragging the "Mov" indicator from the indicator list over the custom indicator, causing that MA to be overlaid upon that indicator. 2) Instead, an extra line of code is added to the custom indicator that calculates the very same moving average in order to have it automatically plotted along with that custom indicator. For example, with a custom indicator called "ind", the code is: mapds := 20; ind := ...CALCULATIONS...; {Formula for computing "ind"} maind := Mov(ind, mapds,E); ind; maind This produces plots of both the custom indicator and its MA. But applying the Mov indicator as described in 1) above exactly the same parameters (number of periods and type) produces a very different result! What might be causing this? Any suggestions to resolve this difficulty will be appreciated. Ken Metz ("Systematic")
 Wanna join the discussion?! Login to your Discussions forum accountor Register a new forum account.
 Systematic #2 Posted : Monday, August 14, 2006 10:01:29 AM(UTC) Rank: MemberGroups: Registered, Registered Users, SubscribersJoined: 9/15/2005(UTC)Posts: 24 Never Mind -- I just figured out the source of the problem. Applying the MA to the custom indicator from the indicator list appears to apply it to the last item to be plotted in the custom indictor. The last line of the previously listed code was: ind; maind This caused the MA to be applied to "maind", not to "ind". Thus, it was producing an MA of an MA. The problem is solved by simply reversing the order of variables in the last line of code to: maind; ind
 Users browsing this topic
 Similar Topics "custom indicator math errors" (Formula Assistance) by naren.orbit 2/21/2012 3:28:03 AM(UTC)
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.