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 |

Bullish and Bearish conditions Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
kenoracle
Posted : Monday, January 25, 2016 3:06:08 AM
Registered User
Joined: 1/13/2012
Posts: 72

Hi.  I have looked through the Discussion Forum and have not found the answer to this issue.

 

I am looking for RealCode for bullish engulfing candles.  Here are the requirements:

1) Candle0's real body (not high/low, but open/close) engulfs Candle(1)'s real body (not the wicks).

2) I do not care whether Candle(1) had a positive or negative day, just want the real body to be smaller than Candle0.

---------------------

I wrote some (bearish engulfing) code that ASSUMED(!) that the prior day's candle was negative.  Unfortunately, in the real-world, manytimes the prior day was positive and fouled up my code.

Let's start with Bullish Engulfig code:

Once the Bullish code is in place, I will be able to create the Bearish equivalent.

 

Thank you in advance for your help.

 

Ken. 

 

 

kenoracle
Posted : Monday, January 25, 2016 3:18:23 AM
Registered User
Joined: 1/13/2012
Posts: 72

TC2000 code may look like this:


(O1 <= c1 AND
O > C1 AND C < O1)
OR
(O1 >= c1 AND
O > O1 AND C < C1)
 

Bruce_L
Posted : Wednesday, January 27, 2016 10:57:56 AM


Worden Trainer

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

Based on your code you want the current candle to have the open be above the close with the tops and bottoms of the body of the previous bar being clearly inside the body of the current bar (neither the tops nor bottoms of the bodies can match).

'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com 
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:Engulfing Candle
'|******************************************************************
If Price.Open > Price.Open(1) AndAlso _
	Price.Open > Price.Close(1) AndAlso _
	Price.Open(1) > Price.Close AndAlso 
	Price.Close(1) > Price.Close Then
	Pass
End If


-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.