I created a bunch of strategies for mutual funds and realized that some do not
work as well for ETFs. I got input from several Amibroker users regarding
that, but have a different take on it now.
My current thinking is that it's not so much that ETFs are not highly
correlated to their mutual fund counterpart as much as it is the difference in
how the formulas handle Open-High-Low-Close with ETFs and only Close for mutual
funds.
The question is how do I "convert" simple formulas over to only look at the
closing price. I'm only using EOD data and don;t care what happened during the
trading day. The strategies are for closing prices only.
As an example, how do I make sure these two sections of code only look at CLOSE:
array1 = round(PDI( 22 ));
array2 = round(MDI( 22 ));
Buy = Cross( array1, array2);
Sell = Cross(array2, array1);
And this code ...
Buy = StochK(50,2)>50 AND Ref(StochK(50,2)<50,-1);
Sell = StochK(50,2)<50 AND Ref(StochK (50,2)>50,-1);
I also understand that to have the formulas work the same with mutual funds or
ETFs, I need to change the ApplyStops to "False" instead of "True."
ex.:
ApplyStop(stopTypeTrailing,
stopModeRisk,
Optimize( "trailing loss stop level", 20, 0, 90, 10 ),
True );
As always, thanks in advance!
Steve.