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 |

Paint rule for Heiken-Ashi candles Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
StefanB
Posted : Friday, May 21, 2010 11:07:25 AM
Registered User
Joined: 1/22/2010
Posts: 7
I am trying to replicate the Heiken-Ashi system I coded for another charting package.  I have the candles working fine but I am having problems coding the paint rules.  In an example I found on the forum the up rule is If Line.Value > Line.Value(1) Then PlotColor = Color.Green.....  What I want to do is the following; If Ha.Close > Ha.Open Then PlotColor = Color.Green.

I have dragged the Heiken-Ashi indicator to my rule code and am referencing it as above but I just get the default yellow bars from the final else clause.  Is it possible to reference the Heiken-Ashi component prices from the paint rules?
Bruce_L
Posted : Friday, May 21, 2010 11:19:43 AM


Worden Trainer

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

While you could Drag and Drop the Indicator into the RealCode Editor of the Paint Scheme to create something like the following:

'# HA = chart.HeikenAshi
If HA.Value > HA.Open Then
 PlotColor = Color.Green
Else
 PlotColor = Color.Red
End If

The following RealCode should work and be more efficient (it works in my copy of StockFinder 5):

If Line.Value > Line.Open Then
 PlotColor = Color.Green
Else
 PlotColor = Color.Red
End If



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
StefanB
Posted : Friday, May 21, 2010 12:04:30 PM
Registered User
Joined: 1/22/2010
Posts: 7
Thanks a lot, the second version worked perfectly.
Bruce_L
Posted : Friday, May 21, 2010 12:18:35 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You're welcome.

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