Possible to use different periods for MA? (minutes and days)

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #55036 quote
    Marke
    Participant
    New

    Hi,   doing some backtesting with different MA crossing on a 10 minute basis. I’d like to add a filter with the price being > 200 days MA, or possibly 12 months MA. Is it possible to use combine different periods in the code?

    #55039 quote
    robertogozzi
    Moderator
    Master

    You can use multiple averages wiyh different periods, of course (which you probably already know), something like:

    IF average[10](close) CROSSES OVER average[30](close) THEN

    but you cannot access multiple timeframes at the same time. If you launch your strategy for a 4h TF, you can only access data referring to that TF, you cannot combine a MA for the daily TF in a 4h TF. You could try to simulate, say, a 200-period daily MA in a 4h TF by multiplying it by 6 (there are 6 4h bars in a day), so an average[200](close) would become an average[1200](close), but it will not yield the very same results.

    At least until the MTF (Multi Time Frame) version is released to traders.

     

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Possible to use different periods for MA? (minutes and days)


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
8 years, 3 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 12/08/2017
Status: Active
Attachments: No files
Logo Logo
Loading...