Help to convert AscTrend indicator to screener

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #175013 quote
    venugopal
    Participant
    New

    Hi Nicolas,

    Can you please help me converting your PRC_Trend indicator on the below link to a screener. So we can screen the stocks received buy or sell signals on daily chart on daily basis.

    ASCTrend

    Many thanks!

    Regards,

    Venu

    #176199 quote
    Nicolas
    Keymaster
    Master

    Here is the screener you are looking for. ASCTrend green or red arrows:

    // --- settings
    RISK=3
    //MAperiod = 100
    // --- end of settings
    
    //ima = average[maperiod]
    
    value10=3+RISK*2
    x1=67+RISK
    x2=33-RISK
    value11=value10
    
    shift=0//CountBars-11-1
    buysig=0
    sellsig = 0
    
    Counter=shift
    iRange=0.0
    AvgRange=0.0
    for Counter=shift to shift+9 do
    AvgRange=AvgRange+Abs(High[Counter]-Low[Counter])
    next
    
    iRange=AvgRange/10
    Counter=shift
    TrueCount=0
    while (Counter<shift+9 and TrueCount<1) do
    if (Abs(Open[Counter]-Close[Counter+1])>=iRange*2.0) then
    TrueCount=TrueCount+1
    endif
    Counter=Counter+1
    wend
    if (TrueCount>=1) then
    MRO1=Counter
    else
    MRO1=-1
    endif
    
    Counter=shift
    TrueCount=0
    while (Counter<shift+6 and TrueCount<1) do
    if (Abs(Close[Counter+3]-Close[Counter])>=iRange*4.6) then
    TrueCount=TrueCount+1
    endif
    Counter=Counter+1
    wend
    if (TrueCount>=1) then
    MRO2=Counter
    else
    MRO2=-1
    endif
    
    
    if (MRO1>-1) then
    value11=3
    else
    value11=value10
    endif
    if (MRO2>-1) then
    value11=4
    else
    value11=value10
    endif
    
    value2=100-Abs(Williams[value11](close)[shift]) // PercentR(value11=9)
    //$Tablevalue2[shift]=value2
    //$val1[shift]=0
    //$val2[shift]=0
    //value3=0
    
    //atr=AverageTrueRange[14](close)
    if (value2<x2) then
    //signals
    if value2[1]>x2[1] and lastsig>=0 then
    sellsig = 1
    lastsig = -1
    //drawarrowup(barindex,low-atr/2) coloured(0,255,0)
    endif
    endif
    
    if (value2>x1) then
    //signals
    if value2[1]<x1[1] and lastsig<=0 then
    buysig = 1
    lastsig = 1
    //drawarrowdown(barindex,high+atr/2) coloured(255,0,0)
    endif
    endif
    
    //distance = close/ima
    condition = sellsig=1 or buysig=1 //and (distance>=.95 and distance<=1.05)
    
    screener[condition]//(distance as "distance")
    
    venugopal thanked this post
    #176454 quote
    venugopal
    Participant
    New

    Thank you so much Nicolas. That works perfect for what I am looking for.

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

Help to convert AscTrend indicator to screener


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
venugopal @venugopal Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by venugopal
4 years, 6 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 08/10/2021
Status: Active
Attachments: No files
Logo Logo
Loading...