Help with multiple timeframes

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #117094 quote
    Thally
    Participant
    Average

    Hi all,

     

    Im having an issue with live testing a system that uses multiple timeframes. The system trades using m1 bars. However, I use a filter based on daily bars that has a lookback period of 100 bars. The trouble seems to be that even when I use

    DEFPARAM PreloadBars = 10000

    the system trades when it shouldn’t. This is evident from the fact that the backtest did not enter a trade today when I have 200,000 bars loaded. However if I adjust the number of bars in the chart it modifies my daily filter indicator.

    Does any one know how to resolve this issue and ensure that system has sufficient historical data to run the appropriate lookback on the daily timeframe.

    Thanks,

    Thally

    #117125 quote
    GraHal
    Participant
    Master

    You probably do not want to … else you would have done … but the easiest for you and for us would be if you post the full code on here.

    I would run it on my Platform and others likely would spot any problems in the code.

    #117130 quote
    robertogozzi
    Moderator
    Master

    I moved this topic to ProOrder support and deleted the other one.

    Please do not double post! Thank you 🙂

    Thally thanked this post
    #117132 quote
    Thally
    Participant
    Average

    I can’t post the whole strategy sadly as I plan on trading this live once ive ironed out this glitch. Its essentially a intraday swing system. I use the below regime filter to only trade on days when SQN is above and below a certain level. Trades are on m1 timeframe but the filter references daily bars.

    sqnLB = 100
    
    // Regime Filer
    timeframe(daily, updateonclose)
    cldiff = close / close[1]-1
    sdcldiff = STD[sqnLB](cldiff)
    avcldiff = Average[sqnLB](cldiff)
    SQN = ((avcldiff * sqrt(100)) / sdcldiff)
    timeframe(default)
    

    The weird thing is that this indicator changes when I change the number of bars in the chart and graphonprice in the strategy backtest. This suggests that the PreloadBars = 10000 isn’t fixing the max number bars passed to the function. 

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

Help with multiple timeframes


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Thally @rodger_dodger Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by Thally
6 years, 1 month ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 01/17/2020
Status: Active
Attachments: No files
Logo Logo
Loading...