[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Need to convert mutual fund formulas for ETFs


  • Date: Mon, 08 Mar 2010 16:25:01 -0000
  • From: "graphman27" <steve@xxxxxxxxxxxxxxxxxxx>
  • Subject: [amibroker] Need to convert mutual fund formulas for ETFs

PureBytes Links

Trading Reference Links

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.







------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    amibroker-digest@xxxxxxxxxxxxxxx 
    amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/