Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 11/15/2007 Posts: 8
|
DO YOU GUYS HAVE ANY REALCODE FORMULAS FOR CANDLE STICK PATTERNS. I HAVE THE HAMMER FORMULA FROM THE VIDEO BUT I WAS LOOKING FOR OTHERS, SUCK AS BEARISH ENGULFING, BULLISH ENGULFING, MORNING AND EVENING STARS, DARK CLOUD AND PIERCING PATTERNS...
IF THERE IS ALREADY A PLACE TO FIND THESE THINGS THEN PLEASE DIRECT ME IN THE RIGHT DIRECTION
THANKS
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
I am woking on a manual for coding candle patterns in Blocks.
Below is a RealCode condition for Bullish Engulfers. You can use the condition's QuickEdit to change the new low period as desired:
'# Period = userinput.integer = 10
Dim NewLowPeriod As Integer=(Period)
Dim NewLow As Single=Single.MaxValue
For i As Integer = 0 To NewLowPeriod
newlow = system.Math.Min(newlow,price.Low(i))
Next
If price.Close>price.Open And price.Open<price.Close(1) _
And price.Close>price.Open(1) AND price.Open(1)>price.Close(1) _
And price.Low=newlow Then pass
- Craig Here to Help!
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
Here is a bearish engulfer:
'# Period = userinput.integer = 10
Dim NewHighPeriod As Integer=(Period)
Dim NewHigh As Single=Single.MinValue
For i As Integer = 0 To NewHighPeriod
newhigh = system.Math.Max(newhigh,price.high(i))
Next
If price.Close<price.Open And price.Open>price.Close(1) _
And price.Close<price.Open(1) And price.Open(1)<price.Close(1) _
And price.high=newhigh Then pass
- Craig Here to Help!
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
Here is Morning Star:
'# Period = userinput.integer = 10
Dim NewPeriod As Integer=(Period)
Dim NewP As Single=Single.MaxValue
For i As Integer = 2 To NewPeriod+2
newp = system.Math.Min(newp,price.low(i))
Next
If price.Low(2)=newp And price.Close(2)<price.Open(2) _
And price.Open(1)<price.Low(2) And price.Open>price.High(1) _
And price.Close>(price.Close(2)+price.Open(2))/2 _
And price.High(1)/price.Low(1)<price.High(2)/price.Low(2) _
And price.High(1)/price.Low(1)<price.High/price.Low _
Then pass
- Craig Here to Help!
|
|
Registered User Joined: 11/15/2007 Posts: 8
|
thanks craig
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
My pleasure. It should get you started while I work on my manual.
- Craig Here to Help!
|
|
Registered User Joined: 9/30/2006 Posts: 317
|
How does the Quick Edit work in this case?
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
After you create the condition, left-click it on the chart to bring up the QuickEdit.
- Craig Here to Help!
|
|
Registered User Joined: 4/14/2008 Posts: 50
|
hi craig ,
where can i find another candlesticks pattern .
the code for them.
is there any possabilitiy to save the condition any where else excpet on the chart ?
thank u so much
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
Until I finish the manual, ask away here.
Conditions are saved as part of a chart, so no. Soon there will be a different location for the conditions (a condition palette) but they will still be owned by their chart.
- Craig Here to Help!
|
|
Guest-1 |