hi mountainking333, welcome.
post your code so we can see what you are trying. in a new post, click on this icon at the top </>. then paste your code in the pop up window. for code type, pick ruby. it doesn't matter what type, different types will change the look of the code.
you mention trying to do several things, draw lines, calc angles, store values,...
try to think about what you want to see on the chart, and leave out the guessing of some middle steps that may or may not help.
lines can be draw from any point to any point on a chart. if you want separate lines that are 1 bar wide, there may be additional code needed so they don't appear as a continious line.
...do you want to see 3 or 4 lines drawn, from every candle, to the next?
...do you want to see a chartbubble under every candle, listing the 4 angles, from previous close to the next bar?
...or show angles , in labels, at the top of the chart, for just to the most recent candle?
...do you need the angles? or just figure out if the next bar parameters are above or below the previous close?
...what do you want to do with the data? do you want to count how many times something happens?
i hope this gives you some ideas for advancing your study.