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 |

Indicator won't display Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
scvenne
Posted : Sunday, January 23, 2011 1:16:28 PM
Registered User
Joined: 5/13/2007
Posts: 48
I'm playing around with some homemade indicators and one of them won't display when I save it. The math is sound but it doesn't show up on my chart for some reason. It is "plot = (price.High - price.Low) / (price.Close - price.Open)". Is there a reason why this formlua won't display?
scvenne
Posted : Sunday, January 23, 2011 1:38:32 PM
Registered User
Joined: 5/13/2007
Posts: 48
Let me add this to my previous post... the scaling on the right side of the indictaor window also does not display, however the indicator's last value does show up where the scaling should be. The indicators value also shows up correctly when using the crosshair pointer, but again the indicator itself does not show up in its respective window on the chart. It acts as if the "show" button isn't checked in the indicator edit menu even though it is checked.
Bruce_L
Posted : Monday, January 24, 2011 9:35:07 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You are probably getting a Division by Zero error when Price.Close = Price.Open. You might want to try something like the following instead:

If Price.Last <> Price.Open Then
    Plot = (Price.High - Price.Low) / (Price.Last - Price.Open)
Else
    Plot = Single.NaN
End If

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
scvenne
Posted : Monday, January 24, 2011 10:49:13 AM
Registered User
Joined: 5/13/2007
Posts: 48
That's what it was, divide by zero error on days when open and close prices were the same. I pasted in your solution and now it displays. Thanks Bruce. Steve
Bruce_L
Posted : Monday, January 24, 2011 10:52:27 AM


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.