Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Bullish and Bearish divergent bar. Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
mampoer
Posted : Sunday, May 15, 2011 4:51:42 PM
Registered User
Joined: 7/7/2010
Posts: 9
Hope you can help?
I want to color buliish and bearish divergent bars.
Bullish divergent = low is lower than previous bar's low and close in upper half of bar
Bearish divergent bar = high is higher than previous bar's high and close is in lower half of bar

My real code is:
If Price.Low < Price.Low(1) And Price.Close > (Price.High + Price.low) / 2 Then
 plotcolor = color.white
ElseIf price.High > price.High(1) And Price.Close < (Price.High + Price.low) / 2 Then
 plotcolor = color.blue
Else 
 plotcolor = color.lime
End If

It gives me 3 errors where it says plotcolor is not declared!
Thanks for your help
mampoer
Bruce_L
Posted : Monday, May 16, 2011 9:06:18 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Make sure you are putting your RealCode in a RealCode Paint Scheme. The PlotColor syntax is not valid as part of a RealCode Condition or RealCode Indicator.

Paint Schemes

You can right-click on an Indicator and select Edit to bring up its Edit window. Then select Edit next to Paint Scheme (or click on the Paint Scheme and select New Paint Scheme) and the Edit button next to Apply RealCode to bring up the RealCode Editor for its RealCode Paint Scheme.

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