Announcement

Collapse
No announcement yet.

Using Daily MA crossover on 5 min bars

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using Daily MA crossover on 5 min bars

    Hi all,

    I have written a trading strategy that uses 5 minute bars to enter and exit. It works well. The issue I have is that although I can apply a MA filter to the 5 min bars, I cannot make the MA larger than 2000(5 min bars) before I get an error.


    Ideally I want to use an MA calculated on daily bars, but applied to 5 minute bars, ie use a 55 day MA applied to the 5 minute strategy. Anyone got any ideas?

    There appears to be no way of using a dual data feed within a single window (as you can in tradestation), the only other thought I have had is to use two charts, one based on the daily data, running the appropriate MA and outputting the MA data to a file, which is then read by the other chart running 5 minute data for use as a filter. Seems a little crude though!!

    I am hoping I have just missed something.....

    many thanks in advance

  • #2
    Examples...

    I created a post (a while back) regarding aligning an oscillator (stored to a file) to another symbol (that read the file). I would have to look for it.. But someone here (maybe Alex) may have it stored for reference???

    Based on what you have requested, I have a question??

    1. on your 5 minute chart - wouldn't the daily MA be rather stagnant?? It would not move much (if at all) on your 5 minute chart.

    2. How would you want to filter the MA into your system? With an MA that is changing with every tick - but based on Daily bars, I would think the actions of the MA would not product a valid filtering mechanism.

    I'll help if I can.

    B
    Brad Matheny
    eSignal Solution Provider since 2000

    Comment


    • #3
      Many thanks for this.

      in answer to your questions

      1:- The idea here is to provide a medium term filter that only allows trades for the day in the general direction of the prevailing trend. Although this can be easily understood manually, I want to include the filter within backtesting.

      2:- I only want to know the medium term trend at the beginning of the day, not update it everytick.

      I normally apply Thomas Stridsman's MA slope as the best trend indicator, I have also used MA price crossover with success too.

      TJ

      Comment


      • #4
        Hi,
        I wrote a study for someone named Digs a while ago that requires two efs studies running at the same time. The idea sounds exactly like what you want to do.

        Try this link:


        If it doesn't work, do a search for almostdantonstop and scroll through the pages until you reach almostdantonstop fileio SET 2.efs and almostdantonstop fileio GET 2.efs.

        Download these and look at the logic for plotting the longer term data on the shorter term chart...you can ignore all the other stuff that calculates the stop etc. You should be able to adapt this to your needs. I commented my thinking pretty well, but let me know if you have any problems. I will be able to reply only briefly prior to this weekend.

        Bob

        Comment


        • #5
          TJ
          In this thread you can find DailyMAonIntraday2.efs which was written by JasonK and which computes a daily moving average to be used with intraday charts.
          Alex

          Comment


          • #6
            Blank efs file

            Many thanks for this Alex, I have looked at the thread and the file getPrevDaysOHLC.efs downloads as blank, could ou find this for me and post it here, or alternatively, paste it into a reply here.

            Many thanks

            TJ

            Comment


            • #7
              TJ
              You can find a copy of getPrevDaysOHLC.efs here
              Alex

              Comment


              • #8
                Many thanks for this Alex, this has sorted it!!

                TJ

                Comment

                Working...
                X