2 day EMA of force index with thinkscript?


Category:
0
0

Its possible to make a 2 day EMA scan of the force index with thinkscript?

Thanks in advance

RESOLVED
Marked as spam
Posted by (Questions: 1, Answers: 1)
Asked on October 10, 2019 11:49 am
119 views
1
Private answer

You did not mention exactly what you are trying to scan for. Yes, you want to create an ema based on the ForceIndex indicator in Thinkorswim. But you didn't tell us what sort of pattern you want. The cross above, cross below? Or simply the position of the ForceIndex in relation to the ema. The later is what I included in this scan:

input fiLength = 13;
input maLength = 2;
input maType = AverageType.EXPONENTIAL;
def fi = ExpAverage(data = (close - close[1]) * volume, fiLength);
def ma = MovingAverage(maType, fi, maLength);
# scan signals
plot scan = fi > ma;
#plot scan = fi < ma;

Note that there are user inputs included here so that folks can adapt this to any type of moving average or length they wish to use.

Marked as spam
Posted by (Questions: 37, Answers: 4084)
Answered on October 11, 2019 8:51 am
0
Thank you very much! I want to scan when the 2-day EMA of Force Index falls below its zero line.
( at October 11, 2019 11:19 am)
0
plot scan = ma[1] > 0 and ma < 0;
( at October 11, 2019 12:44 pm)
0
Much appreciated!
( at October 11, 2019 6:04 pm)