3 tapes LR indicator to screener

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #108093 quote
    Newbie
    Participant
    Average

    Greetings fellow PRT community.

    I’m new to PRC, however, after trying unsuccessfully to create something I found the 3 tapes LR Indicator ready done. https://www.prorealcode.com/prorealtime-indicators/3-linear-regression-tapes-indicator/

    I tried to turn this into a screener, so that it would alert when multiple time frames lined up. However, I understand that PRT screeners don’t support multiple time frame yet, and the simple creation doesn’t really work!

    Ideally I’m trying to make it so that when 4 hour chart, one hour chart meet conditions (3 light, or 2 light), and THEN the 15 min chart indicates 3 light, that the screener would activate to alert of a possible entry. Likewise the same for the negative Dark zones for the shorts.

    I don’t know if anyone has already done this and I’ll keep learning until I work out how to…

     

    Thanks anyway!

    #156373 quote
    robertogozzi
    Moderator
    Master

    You must have misunderstood (or misread) something, ProScreener was the first tool to support MTF (but for the Monthly one), a few years later ProOrder did the same (Monthly included) for strategies and, the most recent one, ProBuilder for indicators, completed the lineup  a few months ago.

    Firstly I modified the indicator to return simple numeric values easy to identify, 1 to 4 and -1 to -4.

    // 3 tapes LR indicator SIGNAL
    //
    // https://www.prorealcode.com/prorealtime-indicators/3-linear-regression-tapes-indicator/
    //
    // modified to return numeric values:
    //
    //    1 to  4 for LONG  signals
    //   -1 to -4 for SHORT signals
    //
    periode1 = 10
    periode2 = 14
    periode3 = 30
    Signal   = 0
    //___________________________________________
    RLx1 = LinearRegression[periode1](close)
    // Création du bandeau
    If RLx1[0] > RLx1[1] then
    Signal = Signal + 1
    Elsif RLx1[0] < RLx1[1] then
    Signal = Signal - 1
    Endif
    //____________________________________________
    RLx2 = LinearRegression[periode2](close)
    // Création du bandeau 2
    If RLx2[0] > RLx2[1] then
    Signal = Signal + 1
    Elsif RLx2[0] < RLx2[1] then
    Signal = Signal - 1
    Endif
    //____________________________________________
    RLx3 = LinearRegression[periode3](close)
    // Création du bandeau 3
    If RLx3[0] > RLx3[1] then
    Signal = Signal + 1
    Elsif RLx3[0] < RLx3[1] then
    Signal = Signal - 1
    Endif
    //____________________________________________
    //Création du bandeau 4 qui ne sert qu'à obtenir une égale hauteur d'histogrammes pour les 3 courbes précédentes
    RLx4 = LinearRegression[2](close)
    If RLx4[0] > RLx4[1] then
    Signal = Signal + 1
    Elsif RLx4[0] < RLx4[1] then
    Signal = Signal - 1
    Endif
    //____________________________________________
    Return Signal AS "Signal"

    Then I coded the scereener:

    TIMEFRAME(4 hour)
    Signal4  = CALL "3 tapes LR indicator SIGNAL"
    TIMEFRAME(1 hour)
    Signal1  = CALL "3 tapes LR indicator SIGNAL"
    TIMEFRAME(15 minute)
    Signal15 = CALL "3 tapes LR indicator SIGNAL"
    TIMEFRAME(default)
    Cond     = 0
    IF (Signal4 >= 2) AND (Signal1 >= 2) AND (Signal15 >= 3) THEN
    Cond = 1
    ELSIF (Signal4 <= -2) AND (Signal1 <= 2) AND (Signal15 <= -3) THEN
    Cond = 2
    ENDIF
    SCREENER[Cond AND close < 5](Cond AS "1=↑, 2=↓")

    the screener returns 1 for positive values and 2 for negative values, since it cannot return negative values, unlike indicators.

    3-tapes-LR-indicator-SIGNAL.itf MyProScreener-3tapes.itf
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

3 tapes LR indicator to screener


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
Newbie @newbie Participant
Summary

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

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 09/20/2019
Status: Active
Attachments: 2 files
Logo Logo
Loading...