Registered User Joined: 8/20/2008 Posts: 8
|
Could someone convert this PCF for me to Blocks:
((L1 = MINL4) OR (L2 = MINL4) OR (L3 = MINL4) ) AND
( (MAXC3 < MAXC4.3)) AND
( (H3 = MAXH15.4) OR (H4 = MAXH15.4) OR (H5 = MAXH15.4) OR (H6 = MAXH15.4) OR (H7 = MAXH15.4) ) AND (((MAXH4.3 - MINL4) / (MAXH4.3 - MINL21.3) > .23) AND ((MAXH4.3 - MINL4) / (MAXH4.3 - MINL21.3) < .62) ) AND
((AVGH3.5) > (AVGH3.8 ) AND (AVGH3.8 ) > (AVGH3.13) AND (AVGH3.13) > (AVGH3.18 ))
Cheers!
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Please try creating the following RealCode Condition:
Static AVGH3(18) As Single
If isFirstBar Then AVGH3(18) = 0
AVGH3(CurrentIndex Mod 19) = AVGH3((CurrentIndex+18) Mod 19) + Price.High/3
If CurrentIndex >= 3 Then AVGH3(CurrentIndex Mod 19) -= Price.High(3)/3
If CurrentIndex >= 24 Then
If Price.MinLow(3,1) = Price.MinLow(4) And _
Price.MaxClose(3) < Price.MaxClose(4,3) And _
Price.MaxHigh(5,3) = Price.MaxHigh(15,4) And _
(Price.MaxHigh(4,3) - Price.MinLow(4)) / _
(Price.MaxHigh(4,3) - Price.MinLow(21,3)) > .23 And _
(Price.MaxHigh(4,3) - Price.MinLow(4)) / _
(Price.MaxHigh(4,3) - Price.MinLow(21,3)) < .62 And _
AVGH3((CurrentIndex-5) Mod 19) > AVGH3((CurrentIndex-8) Mod 19) And _
AVGH3((CurrentIndex-8) Mod 19) > AVGH3((CurrentIndex-13) Mod 19) And _
AVGH3((CurrentIndex-13) Mod 19) > AVGH3((CurrentIndex-18) Mod 19) Then Pass
Else
SetIndexInvalid
End If
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Registered User Joined: 8/20/2008 Posts: 8
|
Thank you Bruce,
I will test your code now
Cheers!
|