♥ 0 |
hi! how are you doing? i’d like to scan for stocks whose price is near the 13 EMA. i dont know how to code for EMA. my scan seems to scan for SMA. this is what i got so far: input price = close; def SMA15 = Average(price[-displace], length1); def pricecond = price>=sma15*((100 + choice1)/100); plot scan = pricecond;
Marked as spam
|
Private answer
So the code you have presented would find stocks with a closing price greater than or equal to the 13 period simple moving average plus 1%. Here is a link to the Thinkorswim language reference describing how to code for the exponential moving average: http://toslc.thinkorswim.com/center/reference/thinkScript/Functions/Tech-Analysis/ExpAverage.html So you would need to modify this statement: As follows:
Don’t forget to up-vote any questions that best solve your question. Marked as spam
|
Please log in to post questions.