[beta-testing] multi timeframe support for automatic trading, ideas are welcome!

Forums ProRealTime English forum ProOrder support [beta-testing] multi timeframe support for automatic trading, ideas are welcome!

Viewing 15 posts - 1 through 15 (of 288 total)
  • #65714

    It’s been a week since I tested, as a consultant, the new multi-timeframe features coming soon for ProBacktest / ProOrder.
    I admit to being really pleasantly surprised by the capabilities of this long-awaited feature. Of course, I came across some small questions about its operation, which could be due to its unfinalized version or to my misinterpretation of its behavior with respect to various scenarios.
    Because yes, indeed, to use several temporal dimensions require an intellectual gymnastics which can sometimes cause trouble in the developments. In short, we will have to deal with it, manage both the information of indicator data in higher timeframes, which have sometimes not yet been frozen by the closing of a candle and the management of our orders in consequence, which are managed by the Close the timeframe “default”, as is the case for example with the screeners.

    Same as ProScreener, this is the TIMEFRAME statement that will now be usable for automatic trading.

    So far, I made various tests, I will show you how it goes (not so hard to understand for our fellow coders around here 🙂 ).

    This is what a multitimeframe strategy code looks a like:


    This basic strategy uses:

    • A Simple Moving Average 100 periods from the 1 hour timeframe (at Close)
    • Smoothed Heikin Ashi from a 15 minutes timeframe (in real time)
    • Stochastic of the default timeframe (at Close)
    • Takeprofit/Stoploss values from an ATR calculated in the 15 minutes TF
    • Trading decisions and orders management in the default timeframe, which is the 5 minutes in this example

    The GRAPH instruction is your new friend! 🙂

    If you are interested, I will be able to test some codes that you want to post, or to share ideas that I can code myself. This will allow me to familiarize myself with the use of this new tool, but also why not, hunt for bugs, testing as many scenarios as possible.


    July 25th EDIT: the MTF functionalities are now available through IG and PRT sponsored for demo accounts.

    A short video made by PRT about the new engine and the MTF capabilities:

    I also made a blog post to explain what you can expect and what you can now do with MTF:  First approach to multi timeframe trading with ProRealTime


    August 8th EDIT: documentation is updated, see here: TIMEFRAME (ProBacktest / ProOrder)

    Total of 18 users thanked author for this post. Here are last 10 listed.
    #65725

    Can you clarify exactly what is meant by ‘at close’ and ‘in real time’.

    If the decisions are made at the close of the default timeframe five minute candle and ‘BARCLOSE’ is used on an hourly timeframe indicator then does it use the indicator results from the last closed hourly candle – and if it is set for ‘real time’ then does it take the current results of the still to close hourly candle?

    2 users thanked author for this post.
    #65727

    Your assumption is right:

    BarClose: we only work in closed bars.
    ‘real time’: The variables defined in the superior timeframe take into account each update of the main TF (the “default” one).

     

    2 users thanked author for this post.
    #65749

    Hello Nicolas,

    thanks for the info, can’t wait! Do you have a rough idea on when it could become available to IG client? I guess it will be first available to PRT Premium clients.

    As simple strategy to test, one could think of Ehlerd impulse strategy, altough it’s more a censorship model than an automated strategy.

    Timeframe: 4h,1h,10min

    entry rules:

    1. on 4h EMA(21) rising and MACD histogram rising from below zero

    2. On 1h EMA(21) rising and MACD making a reversal from below zero

    3. On 10min, a breakout of last 20bars

    exit rules: MFE trailing stop + when EMA(21) or MACD histo stop rising on 1h TF

    risk management: a simple stop in %

     

    #65752

    Looks really cool!!

    Looking forward to this feature..

     

    /M

    #65842

    This will be awesome.
    Dosen´t this mean that we dosen´t have to wait until the next bar to take position?
    Lets say that we have a system for dax 1h but we run it on 5min. Then it will buy 5 min after the bugtrigger instead of in an hour, right?

    #65846

    Lets say that we have a system for dax 1h but we run it on 5min. Then it will buy 5 min after the bugtrigger instead of in an hour, right?

    Yes it is the main reason for the existence of this system. In your example, the code will still be read once at bar close, but on the 5 minutes bar.

    #65853

    So, Nicolas, it will be of greater advantage running all strategies in a 1-second TF, so that the strategy can catch almost immediately any sudden movement and react accordingly or have a much better control over the trailing stop code?

    #65855

    Yes Roberto, this is the timeframe we all think about, if you want to interact quickly between bars. But, if your system only rely on indicators calculated on bar Close (which is the case in 99%) and your program doesn’t embed any orders management other than a fixed StopLoss and TakeProfit, maybe a 1 minute timeframe is enough.

    I’m thinking also of the 200k bars limitations for backtests, that from what I know, will not be extended.

    1 user thanked author for this post.
    #65859

    On 1h EMA(21) rising and<span style=”color: #ff0000;”> MACD making a reversal from below zero</span>

    What do you mean precisely in this case? What is the difference with the 4 hours condition: MACD histogram rising from below zero ?

    #65862

    Bonjour Nicolas

    Bonne nouvelle et j’espère que ça ne sera pas trop compliqué et que ça fonctionnera bien.

    Je serais ravi comme beaucoup d’avoir quelques exemples de stratégies bien expliquées (avec explication sur chaque ligne de codage)

    pour nous  permettre de bien comprendre .

    Bonne après midi

    #65874

    I’m thinking also of the 200k bars limitations for backtests, that from what I know, will not be extended.

    https://www.prorealcode.com/topic/demarker-adaptive-arrows-divergence/

     

    months ago i asked for this indicator and it wouldn’t be possible to code since there wasn’t multiframe.

    #65875

    @Gianluca

    I think you are confusing between multi-timeframe (get values from different timeframe at the same time and in the same program) and multi dimensional arrays (store values of any kind into a dynamic variables table), which are things totally different 🙂

    https://en.wikipedia.org/wiki/Array_data_structure

    #65887

    Useful tip: Multi timeframe support is only coming for automatic trading through ProOrder/ProBacktest, but building a dummy strategy with a template made of GRAPH instructions could be helpful for plenty of non-automatic traders.

    Example attached is a chart with Tenkan / Kijun from different timeframes. If you let the strategy run live with ProBacktest, the chart will constantly be refreshed with your new “MTF indicators”. The white line is the Close of the opened chart (15 minutes). Of course we do not have the bells and whistles of a real ProBuilder indicator, but that is a great improvement for all people trading with MTF indis. It also let us build custom MTF indicators through ProBacktest, that’s what I call a real “workaround” of the lack of multiple timeframe support of ProBuilder.

    #65894

    Hello Nicolas, regarding your question about the strategy I proposed to test, difference between both TF is that in 1H, you catch directly the reversal below zero when the histo stop falling, while on the 4H the trough can be several bars away, it just need to rise vs latest bar. But to be honest no clue if it can lead to something, just had that in mind

Viewing 15 posts - 1 through 15 (of 288 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login