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

Harami Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
massey1134
Posted : Sunday, December 9, 2012 12:48:39 PM
Registered User
Joined: 11/6/2012
Posts: 3

I get an error message " divide by 0" to the following formulae and yet it appears to work

(O1>C1)AND(C>O)AND(C<=O1)AND(C1<=O)AND(O1-C1)/((.001+(H1-L1))>0.6)AND(C-O)/((.001+(C1-O1))<.6)ANDABS(O1-C1)>((ABS(O2-C2)+ABS(O3-C3)+ABS(O4-C4)+ABS(O5-C5)+ABS(O6-C6)+ABS(O7-C7)+ABS(O8-C8)+ABS(O9-C9)+ABS(O10-C10))/10)*1.3

The same error message for Hammer 'divide by 0"

Bruce_L
Posted : Monday, December 10, 2012 9:46:23 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

I'm not a candlestick guy (at all), but I would probably rewrite this as:

O1 >= C AND C > O AND O >= C1 AND O1 - C1 > (H1 - L1) * .6 AND C - O < (O1 - C1) * .6 AND O1 - C1 > 1.3 * (ABS(O2 - C2) + ABS(O3 - C3) + ABS(O4 - C4) + ABS(O5 - C5) + ABS(O6 - C6) + ABS(O7 - C7) + ABS(O8 - C8) + ABS(O9 - C9) + ABS(O10 - C10) + ABS(O11 - C11)) / 10

It attempts to avoid division and rearranges the parentheses significantly. If your hammer pattern looks like:

(H-L)>(3*abs(O-C))AND((C-L)/(.001+(H-L))>0.8)AND(O-L)/((.001+(H-L))>0.8)

I would make similar changes to get rid of the division:

H - L > 3 * ABS(O - C) AND C - L > (H - L) * .8 AND O - L > (H - L) * .8



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
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.