Thursday, November 13, 2008

thinkScript - Linear Regression Indicator - price based colors


This is just a very simple study that paints the Linear Regression Indicator line in your default uptick color if the current bar's close is above the LRI, or downtick if the current bar's close is lower than the LRI...

!!!! FOR EDUCATIONAL PURPOSES ONLY!!! PLEASE READ DISCLAIMER POST!



input length = 25;

input price = close;

plot lri = reference linearregrindicator(length, price);

lri.assignvalueColor(if close>lri then color.green else color.red);

No comments: