Registered User Joined: 4/5/2008 Posts: 173
|
I have the following RealCode that works fine on my charts EXCEPT when I want to make a new chart.
Its for a hammer candlestick.
When I open the file I get a new pane under the price pane - what I thought I would get was a new indicator that I could use to color the price bars.
What am I doing wrong here?
Ash
If Price.High - Price.Open <= (Price.High - Price.Low) / 3 AndAlso _
Price.High - Price.Last <= (Price.High - Price.Low) / 3 AndAlso _
Price.High > Price.Low Then
Plot = Price.Low - .05
Else
Plot = Single.NaN
End If
|
Registered User Joined: 10/7/2004 Posts: 886
|
You don't want to make an indicator for this purpose (which gives you a numeric value).... what you want is a condition, which gives you a pass/fail.
You can't "paint" price (for example) with a value; you have to paint with a condition (e.g if "X" is true, paint candle green, if not, paint red.)
Take a look at the "bullish hammer" condition in the library, which will do what you want to do. Add the condition to your chart, then edit it and select "paint."
Bob
|