Lines on PerecentChg study on ToS


Category:
0
0

I would like to add lines on the PercentChg study on ToS.  I use it to determine change in price on a percentage basis.  I use daily and weekly changes.  I use it on only a few indexes and individual stocks.  What I want to do is add lines to the thinkscript at +/- values.  1% 1.5%, 2%, 2.5%, 3%, 3.5%.  Both +/-.  I hand draw them in, but if you change the stock or index the lines you placed stay with the symbol you wrote it on.  Plus it would be nice not to have to hand draw them in.  See the attached file.

Thank you

Attachments:
Marked as spam
Posted by (Questions: 1, Answers: 0)
Asked on April 8, 2019 9:27 am
72 views
0
Hello, I like the concept and I have been struggling to figure the code for this. Is it okay to share it, I would like to try it out.
( at April 26, 2019 1:41 pm)
0
Private answer

Very simple. You will copy the original source code from that study and add the following lines to the bottom of that code:

plot plusOnePrct = 0.1;
plot plusTwoPrct = 0.2;
plot plusThreePrct = 0.3;
plot plusFourPrct = 0.4;
plot minusOnePrct = -0.1;
plot minusTwoPrct = -0.2;
plot minusThreePrct = -0.3;
plot minusFourPrct = -0.4;

Marked as spam
Posted by (Questions: 37, Answers: 4084)
Answered on April 17, 2019 7:17 am