Updated Strategy Tutorial: Now Works On Daily

I added some wizardry with the “getaggregationperiod” function to decide if a chart is intraday or otherwise. Now my EMA Crossover strategy scripts work on all chart timeframes. See the original post for the code.

Tags:

7 Responses to “Updated Strategy Tutorial: Now Works On Daily”

  1. scott Says:

    Hi, Would you be willing to give me a head start on how to do the following (I’m brand new to TOS): I’d like to run a screen on closes above mutiple moving averages. For example, a long entry above the 50 and 200 day ema, a long exit when the close is below either one of the EMAs. And then of course, a short entry with a close below multiple averages with a short exit when the stock closes above any of the moving averages? Any help would be greatly appreciated!

  2. Prospectus Says:

    Sure, Scott! No problem. Only thing is I’m away from my pc for a few days. I’ll see what I can hack together from my iPhone in the meantime, but worst case I’ll get you something on Friday.

    Couple of questions: Do you follow what I described in my strategy tutorial, or do you need more step by step help? If you just had the right strategy files, would you be in business? Finally, do you follow enough that you could paste a couple lines of code into a strategy yourself, or not? After you get back to me, I can take the next step.

  3. scott Says:

    Yes, Great, no rush! I can follow it on a basic level and TOS said they could also assist in script writing but I’m skeptical (I’m in the process of transferring accounts over). With another example, I could make minor modifications on the numbers to start and hopefully learn more as I go along. It would be great if you could show an example of a script with a stock trading above 3 different moving averages (simulateously) as a long entry and a long exit upon any one of the 3 averages being broken and then I could handle the short side scripting. TOS has some great tools – I’ve heard their FX trading isn’t that great but I’m looking forward to using the papermoney tools.

  4. scott Says:

    I was wondering if you had any idea on how to build the follow: a long position entered when a stock is trading at xxx-day high or an all-time high AND that has been trading for at least 1 year. This would be in order avoid new issues which may only be trading for a few weeks or months. If you’re interested in the returns on this strategy you should check out a paper by blackstar funds http://www.trendfollowing.com/whitepaper/Does_trendfollowing_work_on_stocks.pdf. A long exit would be initiated when the stock fall x-times the ATR.

  5. Prospectus Says:

    Scott,

    Hang in there; you’re on my list.

  6. scott Says:

    Hey no problem, thanks for the help. Here’s an easy one for you: do you use tradery.com? They have similar tools that allow you to backtest strategies for free.

  7. Prospectus Says:

    Never used Tradery. I’ll have to take a look.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: