Is it possible to convert this strategy into a screener?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #230365 quote
    osnxp7osnxp7
    Participant
    New

    Is it possible to convert this strategy into a screener?

    Indicator : awesome oscillator

    Untitled.jpg Untitled.jpg
    #230382 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    What are the conditions?

    osnxp7 thanked this post
    #230384 quote
    osnxp7osnxp7
    Participant
    New

    What are the conditions?

    Conditions applicable to the awesome oscillator indicator in the image
    Marked by circles
    Thank you for your response, my friend

    #230398 quote
    Iván GonzálezIván González
    Moderator
    Legend

    Hello, if what you are looking for is an oscillator making decreasing minimums, you could store the maximum value reached by the oscillator each time it is positive and then draw a line that joins the maximums. If the line has a negative slope then we look for those values that are crossing upwards today.

    AO=Average[5](MedianPrice)-Average[34](MedianPrice)
    
    if AO > 0 then
    n=n+1
    aohigh = highest[n](AO)
    elsif AO crosses under 0 then
    $aohighprev[t+1]=aohigh[1]
    $aohighprevx[t+1]=barindex-barssince(ao=aohigh)
    t=1+t
    else
    n=0
    endif
    
    //(x-x1)/(x2-x1) = (y-y1)/(y2-y1)
    y1 = $aohighprev[max(0,t-1)]
    x1 = $aohighprevx[max(0,t-1)]
    y2 = $aohighprev[t]
    x2 = $aohighprevx[t]
    
    yy = y1+(barindex-x1)*(y2-y1)/(x2-x1)
    
    if y1 > y2 and ao[0] > yy and ao[1] < yy then
    res = 1
    else
    res = 0
    endif
    
    screener[res=1]
    pror and osnxp7 thanked this post
    #230407 quote
    prorpror
    Participant
    Veteran

    Hello, is it ok for the reverse ?

    thks

    AO=Average[P1](MedianPrice)-Average[P2](MedianPrice)
    
    if AO < 0 then
    n=n+1
    aoLOW = LOWest[n](AO)
    elsif AO crosses OVer 0 then
    $aoLOWprev[t+1]=aoLOW[1]
    $aoLOWprevx[t+1]=barindex-barssince(ao=aoLOW)
    t=1+t
    else
    n=0
    endif
    
    //(x-x1)/(x2-x1) = (y-y1)/(y2-y1)
    y1 = $aoLOWprev[max(0,t-1)]
    x1 = $aoLOWprevx[max(0,t-1)]
    y2 = $aoLOWprev[t]
    x2 = $aoLOWprevx[t]
    
    yy = y1+(barindex-x1)*(y2-y1)/(x2-x1)
    
    if y1 < y2 and ao[0] < yy and ao[1] > yy then
    //res = 1
    DRAWARROW(barindex, close)COLOURED("RED")
    //else
    //res = 0
    endif
    
    RETURN
    #230446 quote
    Iván GonzálezIván González
    Moderator
    Legend

    Casi

    AO=Average[5](MedianPrice)-Average[34](MedianPrice)
    
    if AO < 0 then
    n=n+1
    aoLOW = LOWest[n](AO)
    elsif AO crosses OVer 0 then
    $aoLOWprev[t+1]=aoLOW[1]
    $aoLOWprevx[t+1]=barindex-barssince(ao=aoLOW)
    t=1+t
    else
    n=0
    endif
    
    //(x-x1)/(x2-x1) = (y-y1)/(y2-y1)
    y1 = $aoLOWprev[max(0,t-1)]
    x1 = $aoLOWprevx[max(0,t-1)]
    y2 = $aoLOWprev[t]
    x2 = $aoLOWprevx[t]
    
    yy = y1+(barindex-x1)*(y2-y1)/(x2-x1)
    
    if y1 < y2 and ao[0] < yy and ao[1] > yy then
    //res = 1
    DRAWARROWdown(barindex, ao)COLOURED("RED")
    drawsegment(x1,y1,barindex,yy)
    //else
    //res = 0
    endif
    
    RETURN aolow coloured("red")style(dottedline,2), ao, $aolowprev[t] coloured("blue"), 0 style(dottedline,1)
    
    pror thanked this post
Viewing 6 posts - 1 through 6 (of 6 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

Is it possible to convert this strategy into a screener?


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
osnxp7 @osnxp7 Participant
Summary

This topic contains 5 replies,
has 4 voices, and was last updated by Iván GonzálezIván González
2 years, 5 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 03/24/2024
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...