Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Efficient Stocks Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Reynolds05
Posted : Sunday, December 12, 2010 1:25:17 AM
Registered User
Joined: 3/6/2005
Posts: 16
Can you convert this PCF into real code for Stock Finder 5?

(H - L60) / (60 * ((AVGH60 - AVGL60) / 2 + (ABS(H - C1) + ABS(C1 - L) + ABS(H1 - C2) + ABS(C2 - L1) + ABS(H2 - C3) + ABS(C3 - L2) + ABS(H3 - C4) + ABS(C4 - L3) + ABS(H4 - C5) + ABS(C5 - L4) + ABS(H5 - C6) + ABS(C6 - L5) + ABS(H6 - C7) + ABS(C7 - L6) + ABS(H7 - C8) + ABS(C8 - L7) + ABS(H8 - C9) + ABS(C9 - L8) + ABS(H9 - C10) + ABS(C10 - L9) + ABS(H10 - C11) + ABS(C11 - L10) + ABS(H11 - C12) + ABS(C12 - L11) + ABS(H12 - C13) + ABS(C13 - L12) + ABS(H13 - C14) + ABS(C14 - L13) + ABS(H14 - C15) + ABS(C15 - L14) + ABS(H15 - C16) + ABS(C16 - L15) + ABS(H16 - C17) + ABS(C17 - L16) + ABS(H17 - C18) + ABS(C18 - L17) + ABS(H18 - C19) + ABS(C19 - L18) + ABS(H19 - C20) + ABS(C20 - L19) + ABS(H20 - C21) + ABS(C21 - L20) + ABS(H21 - C22) + ABS(C22 - L21) + ABS(H22 - C23) + ABS(C23 - L22) + ABS(H23 - C24) + ABS(C24 - L23) + ABS(H24 - C25) + ABS(C25 - L24) + ABS(H25 - C26) + ABS(C26 - L25) + ABS(H26 - C27) + ABS(C27 - L26) + ABS(H27 - C28) + ABS(C28 - L27) + ABS(H28 - C29) + ABS(C29 - L28) + ABS(H29 - C30) + ABS(C30 - L29) + ABS(H30 - C31) + ABS(C31 - L30) + ABS(H31 - C32) + ABS(C32 - L31) + ABS(H32 - C33) + ABS(C33 - L32) + ABS(H33 - C34) + ABS(C34 - L33) + ABS(H34 - C35) + ABS(C35 - L34) + ABS(H35 - C36) + ABS(C36 - L35) + ABS(H36 - C37) + ABS(C37 - L36) + ABS(H37 - C38) + ABS(C38 - L37) + ABS(H38 - C39) + ABS(C39 - L38) + ABS(H39 - C40) + ABS(C40 - L39) + ABS(H40 - C41) + ABS(C41 - L40) + ABS(H41 - C42) + ABS(C42 - L41) + ABS(H42 - C43) + ABS(C43 - L42) + ABS(H43 - C44) + ABS(C44 - L43) + ABS(H44 - C45) + ABS(C45 - L44) + ABS(H45 - C46) + ABS(C46 - L45) + ABS(H46 - C47) + ABS(C47 - L46) + ABS(H47 - C48) + ABS(C48 - L47) + ABS(H48 - C49) + ABS(C49 - L48) + ABS(H49 - C50) + ABS(C50 - L49) + ABS(H50 - C51) + ABS(C51 - L50) + ABS(H51 - C52) + ABS(C52 - L51) + ABS(H52 - C53) + ABS(C53 - L52) + ABS(H53 - C54) + ABS(C54 - L53) + ABS(H54 - C55) + ABS(C55 - L54) + ABS(H55 - C56) + ABS(C56 - L55) + ABS(H56 - C57) + ABS(C57 - L56) + ABS(H57 - C58) + ABS(C58 - L57) + ABS(H58 - C59) + ABS(C59 - L58) + ABS(H59 - C60) + ABS(C60 - L59)) / 120)) >= .15
jas0501
Posted : Sunday, December 12, 2010 2:38:02 PM
Registered User
Joined: 12/31/2005
Posts: 2,499

not efficient approach

 
total as single

if currentindex > 59 then
    total = (price.avgh(60) - price.avgl(60))/2
    for i = 0 to 59
     tot += system.mth.abs(price.hign(i) - price.close(i+1)) + _
        system.math.abs(price.close(i+1) - price.low(i) 
    next i
    total /= 2
    if (price.High - price.low(60))/total >  0.15 then
        pass
    end if
end if

an efficient approach would not llop and adjust the total by adding the leading edge and subtracting to training edge pieces and avoid the looping

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.