Hey question about line 8: x = out'1'> out'5'; This reads to me as comparing SMA 1 to SMA 5... where am I wrong on this as it doesn't make sense to me in identifying the slop of teh 20mA (line 3)
I'm looking at using the slope (positive or negative) of a MA in a bigger "if" equation and this is the closest thing i've found to using pine script built in language instead of a manual slope calculation. So thank you for your script and hopeful reply
** I found this in the pinescript manual - I assumed the square brackets were a form of data entry to the current function but it is this"[] Series subscript. Provides access to previous values of series expr1. expr2 is the number of bars back, and must be numerical. Floats will be rounded down.**
Since i am using the 200ma than only 5 bars back is not accurate for me so my search continues!