Registered User Joined: 1/5/2010 Posts: 29
|
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.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
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.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Registered User Joined: 12/31/2005 Posts: 2,499
|
QUOTE (brihous)
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.
The expression error is the # lrs which is not a legal variable name.
|