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 |

LRS Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
brihous
Posted : Saturday, January 4, 2014 10:39:32 AM
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.

 

Bruce_L
Posted : Monday, January 6, 2014 9:51:32 AM


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
jas0501
Posted : Wednesday, January 8, 2014 1:39:54 PM
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.

 

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.