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