Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Question re coding for personal indicators Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
pendletonc
Posted : Saturday, November 22, 2014 3:42:56 PM
Registered User
Joined: 8/7/2012
Posts: 28

Hi,

I wrote a progam to scan for pullbacks to the 10-day moving avg.  The code is

as follows:

(L > AVGC10 OR L <= AVGC10)

AND (L1 > AVGC10)

AND (L2 > AVGC10)

AND (L3 > AVGC10)

AND (L4 > AVGC10)

AND (L5 > AVGC10)

AND (L6 > AVGC10)

AND (L7 > AVGC10)

AND (L8 > AVGC10)

AND (L10 > MINL45 AND L11 > MINL45 AND L12 > MINL45 AND L13 > MINL45

AND L14 > MINL45 AND L15 > MINL45 AND L16 >MINL45 AND L17 > MINL45

AND L18 > MINL45 AND L19 > MINL45 AND L20 > MINL45)

I tested the above on ticker symbol ADM,which visual inspection of the stock chart

indicates that it does indeed conform.  However, it gave back a FALSE reading.

I noticed that the value for the AVGC10 term was the same for all entries.  For example.

the values used to compute the L4 term (L4 > AVGC10) appeared as 51.15 > 51.63.

The value for the 10-day MA was given on the price chart as 50.71 for L4 (and the low

was given as 51.15).  Thus, the expression would have been expected to be 51.15 > 50.71.

What is the appropriate code term to obtain the 10-day MA value for the day in question, eg, 50.71,

versus the value used for the AVGC10 term throughout the computation, eg, 51.63?

Thank you.

 
 
pendletonc
Posted : Saturday, November 22, 2014 4:55:53 PM
Registered User
Joined: 8/7/2012
Posts: 28

QUOTE (pendletonc)

Hi,

I wrote a progam to scan for pullbacks to the 10-day moving avg.  The code is

as follows:

(L > AVGC10 OR L <= AVGC10)

AND (L1 > AVGC10)

AND (L2 > AVGC10)

AND (L3 > AVGC10)

AND (L4 > AVGC10)

AND (L5 > AVGC10)

AND (L6 > AVGC10)

AND (L7 > AVGC10)

AND (L8 > AVGC10)

Thank you.

 
 

By Jove I think I've got it!

L4 > AVGC10.4 etc.

diceman
Posted : Saturday, November 22, 2014 6:38:50 PM
Registered User
Joined: 1/28/2005
Posts: 6,049

QUOTE (pendletonc)

 

 
 

 

By Jove I think I've got it!

L4 > AVGC10.4 etc.

 

Yes thats it.

 

AVGC10  TODAY

AVGC10.1 YESTERDAY

AVGC10.2 BAR BEFORE YESTERDAY

 

Thanks

 

Users browsing this topic
Guest-1

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.