can I use rotational trading and add additional filters?

0 votes
I would like to back test a rotational trading system using ETFs.  However, I want to add an additional EMA(n) filter that would exit the position(s) if that position drops below it's own EMA(n) even though it is still above top "Worst to Hold".  Can you do that with Amibroker?

If that is possible, I will upgrade to most current version.

asked May 31, 2017 in AmiBroker by Mark Palmer

1 Answer

0 votes
Sure you can do that. An example code would be like this:

PositionScore = ..your original score...

ExitPosIfThatIsTrue = Close < EMA( Close, 10 );

PositionScore = IIF( ExitPosIfThatIsTrue, 0, PositionScore );
answered May 31, 2017 by admin (9,260 points)