Multi-Timeframe ProScreener with triangular average

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #101811 quote
    ovschalkovschalk
    Participant
    New

    Hi,

    Can you supply the code for a multi timeframe ProScreener, combining month and week?

    I saw Nicolas already addressed a similar query about monthly reference, but the coding does not apply in this query, and my own coding does not work (https://www.prorealcode.com/topic/monthly-pin-bar-proscreener/)

    Many thanks

    // The following code is related to this timescale:weekly
    TIMEFRAME(weekly)
    indicator1 = TriangularAverage[15](close)
    c1 = (low > indicator1)
    
    // The following code is related to this timescale:monthly
    TIMEFRAME(monthly)
    indicator2 = TriangularAverage[15](close)
    c2 = (low > indicator2)
    
    // The following code is related to this timescale:DEFAULT
    TIMEFRAME(DEFAULT)
    
    SCREENER[c1 AND c2] ((close/DClose(1)-1)*100 AS "%Chg yest.")
    #101840 quote
    VonasiVonasi
    Moderator
    Master

    ovschalk – Welcome to the forums.

    Please always use the ‘Insert PRT Code’ button when posting code in the forums as it makes it far easier for everyone to read. I have tidied up your post for you. 🙂

    #101841 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Nicolas’ code dealt with Pinbars, which are simply like a house, you start from the ground, then fill them as data flow in, so it’s (apparently) easy to make a monthly pin bar our of intraday or weekly bars. I happend to display a 4-hour heikin-ashi bar on a 1-hour TF, but that’s just as simple. No special calculations are needed, just sumations.

    But when you need to calculate data from a lower TF in a higher one, well… it’s almost impossible to do. You can do that with simple moving averages because they are just a sum of n values divided by n, it has also been done for Bollinger Bands. But when it comes to more complex calculations, like a Triangular (or Exponential) MA, or  Stochastic and many more… you just have to give up because results will NEVER be the same!

    You could simply multiply n (periods of your average) by 4, because there are 4 (or 4.5, or 4.3 or whatever else?) to convert a weekly Triangular average into a monthly one. No, a weekly Triangular average of 15 periods cannot be changed to 60  periods to make it a 15-period monthly Triangular average, becuse it will still be a 60-period weekly Triangular average!

    #101846 quote
    ovschalkovschalk
    Participant
    New

    Hi @robertogozzi

    Thanks for the quick response

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Multi-Timeframe ProScreener with triangular average


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
ovschalk @ovschalk Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by ovschalkovschalk
7 years, 3 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 07/02/2019
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...