Multi timeframe – MTF indicators for ProRealTime

Forums ProRealTime English forum ProBuilder support Multi timeframe – MTF indicators for ProRealTime

  • This topic has 145 replies, 48 voices, and was last updated 1 month ago by avatardruby.
Viewing 15 posts - 106 through 120 (of 146 total)
  • #215448

    Could someone help me with the following. I’ve created an indicator with a default timeframe and the monthly timeframe. The code seems to be good but when i want to apply it I get this message, see attachment below. When I look on the daily timeframe or the weekly it doesn’t matter, same message.

    Thank you in advance.

    #215452

    Hi Marpat,

    Further explanation would not help, as the message is overly clear (as long as you can read Dutch 😉 ).

    The suggestion would now be to show your code, including a screenshot of the timeframe used on your chart. But hint in advance : the timeframe of a week would not fit in the timeframe of one month. So don’t make the mistake that this is so.
    The timeframes must really be dividable. Like 4 hours and 1 hour.

    Regards,
    Peter

    1 user thanked author for this post.
    #215467

    Hello, further to PeterST comments…

    Because the timeframe used in the Timeframe instruction needs to be a multiple of the Default timeframe.

    Try replacing  the ‘1month’ with ‘4weeks’.

    I think that because a Month can be a different number of  days, a default of ‘1day’ should work.

    However, ‘1week’ doesn’t divide into all the months.

    Regards

    #215483

    I think that because a Month can be a different number of  days, a default of ‘1day’ should work.

    I did not try it, but I don’t think that will work. In this case because you still can’t say that any month always exists of an equal amount of working (trading) days. Besides we have the one month comprising of 30 days, the other of 31, then 28 or 29 …

    We must think more in “math” terms. You must be able to have a paper with all the boundaries of the faster timeframe and overlay that with a transparent with the slower timeframe boundaries. Now the lines of the latter should exactly lay over the lines of the faster timeframe.

    #215484

    Try replacing  the ‘1month’ with ‘4weeks’.

    This should work, please try this workaround.

    #215490

    I think that because a Month can be a different number of days, a default of ‘1day’ should work.

    I did not try it, but I don’t think that will work. In this case because you still can’t say that any month always exists of an equal amount of working (trading) days. Besides we have the one month comprising of 30 days, the other of 31, then 28 or 29 …

    I just tried this code on a daily chart:

    it seems a 1 month indicator works fine on daily charts.

    1 user thanked author for this post.
    #217417

    hi, I’m trying to display multiple segment based on différent timeframe. Here is the code :

    It works perfectly for “ST 1h” and “ST 4H” but nothing displays for “ST 1J” and “ST 1W”, any idea of the pb ?

    #217438

    Try increasing the number of units.

    If you are using a 15-minute TF, there are:

    • 4 units (bars) in one hour
    • 16 units in 4 hours
    • 96 units in a day
    • 480 units in a week (even slightly more if an instrument also trades on Sundays)

    So, if you use an indicator with, say, 10 periods, you will have to multiply the highest of the above numbers (480)  by at least 10, etc…

     

     

     

    #220186

    Can we use timeframe instruction after IF / Then ?

    If we want to test what is the default timeframe before deciding which other timeframe to apply for example…

    #220191

    No, you can’t. It’s not allowed, as it’s not allowed to use a variable for the number of hours, days, minutes, etc…

     

    #220194

    This is very sad…

    Thanks for the reply

    #228541

    Hey everyone! Thanks for share!

    i have any ask about this code for Multiframe support.

    Can i use this same code multiframe for apply in Strategies automated , too? Or is it only for apply in any indicators?

    If is not, Can yoy share me any code example for apply in 2 diffrenets multiframe in any strategies (notr indicators), please?

    Thanks you!

    #228545

    The Multi Time Frame support is available both in strategies and indicators.

    You can search this forum for its acronym MTF to retrieve many links to examples and snippets that will help you delve into MTF coding.

     

    #229706

    Hi all,

    Since today I encounter some problems with a MTF indicator. It worked before.
    On a 5min chart, I want to use the Daily timeframe.

    Pseudo code

    I shows my ‘ret’ line for a second, and then says ‘Calculation error’. I am using RTH as trading hours (ETH never worked).
    ProScreener works fine. Using hours instead of daily works. So the problem is really this ‘daily’ timeframe.

    Does somebody else encounter the same problems? Do I have to code this differently? For example using ’24 hours’?

    Thanks!

    #229707

    Hi

    perhaps not enough history/units are loaded on your 5 min charts ?

Viewing 15 posts - 106 through 120 (of 146 total)

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