TC2000.com• Download software • Tutorial videos • Subscription & data-feed pricing • Class schedule
TC2000Brokerage.com• New account application • Trading resources • Margin rates • Stock & option commissions
Worden Discussion Forum
Customer Training & Support
Ask a Trainer - StockFinder 5.0
How can I make indicators for price being above the linear regression slope 20(lrs) and another indicator with price being below lrs . The lrs is already on my charts however when I try to create a condition with price history the lrs does not show up in the pull down. I attempted to do it in real code however it keeps giving me expression error. This is what I tried.
if price.close > # lrs then pass.
It doesn't make sense to do this because price and the linear regression slope are being (and should be) plotted on different scales. The relative positions and crossovers of the two lines are meaningless in that they will change with scroll and zoom.
If you have imported the linear regression slope indicator into the RealCode, # lrs most likely needs to be lrs.value instead, but the exact variable name would depend on what was assigned by the RealCode Editor.
The expression error is the # lrs which is not a legal variable name.