Absolute Strength indicator with Pro Screener

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #117335 quote
    Jo han
    Participant
    New

    Trying to get the following indicator to work with pro screener.
    Any help on how to modify the code to make it work would be appreciated.

    //PRC_Absolute Strength | indicator
    //16.01.2019
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
     
    // --- settings 
    Mode =0   // 0-RSI method 1-Stoch method
    Length = 9 // Period
    Smooth = 1 // Period of smoothing
    ModeMA = 2 // Mode of Moving Average
    // --- end of settings 
     
    if barindex>max(Length,Smooth) then 
     Price1=customclose
     Price2=customclose[1]
     
     if Mode=0 then
      Bulls=0.5*(Abs(Price1-Price2)+(Price1-Price2))
      Bears=0.5*(Abs(Price1-Price2)-(Price1-Price2))
     endif
     if Mode=1 then
      smax=Highest[Length](high)
      smin=Lowest[Length](low)
      Bulls=Price1 - smin
      Bears=smax - Price1
     endif
     
     AvgBulls=average[Length,ModeMA](Bulls)
     AvgBears=average[Length,ModeMA](Bears)
     
     SmthBulls=average[Smooth,ModeMA](AvgBulls)
     SmthBears=average[Smooth,ModeMA](AvgBears)
    endif
     
    RETURN  SmthBulls coloured(0,0,255,50) style(histogram),  SmthBears coloured(255,0,0,50) style(histogram) , SmthBears coloured(255,0,0) style(line,3), SmthBulls coloured(0,191,255) style(line,3)
    
    #117338 quote
    robertogozzi
    Moderator
    Master

    There you go, I simply made it run by scanning Bulls CROSSING OVER Bears.

    You’ll have to set conditions to scan the market according to your needs.

    //PRC_Absolute Strength | indicator
    //16.01.2019
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
     
    // --- settings
    Mode =0   // 0-RSI method 1-Stoch method
    Length = 9 // Period
    Smooth = 1 // Period of smoothing
    ModeMA = 2 // Mode of Moving Average
    // --- end of settings
     
    if barindex>max(Length,Smooth) then
    Price1=customclose
    Price2=customclose[1]
     
    if Mode=0 then
    Bulls=0.5*(Abs(Price1-Price2)+(Price1-Price2))
    Bears=0.5*(Abs(Price1-Price2)-(Price1-Price2))
    endif
    if Mode=1 then
    smax=Highest[Length](high)
    smin=Lowest[Length](low)
    Bulls=Price1 - smin
    Bears=smax - Price1
    endif
     
    AvgBulls=average[Length,ModeMA](Bulls)
    AvgBears=average[Length,ModeMA](Bears)
     
    SmthBulls=average[Smooth,ModeMA](AvgBulls)
    SmthBears=average[Smooth,ModeMA](AvgBears)
    endif
    
    //RETURN  SmthBulls coloured(0,0,255,50) style(histogram),  SmthBears coloured(255,0,0,50) style(histogram) , SmthBears coloured(255,0,0) style(line,3), SmthBulls coloured(0,191,255) style(line,3) 
    SCREENER[SmthBulls CROSSES OVER SmthBears]
    Jo han thanked this post
    #117348 quote
    Jo han
    Participant
    New

    Thanks alot!
    Works like a charm!

    🙂

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

Absolute Strength indicator with Pro Screener


ProScreener support

New Reply
Author
author-avatar
Jo han @jo_han Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Jo han
6 years ago.

Topic Details
Forum: ProScreener support
Language: English
Started: 01/20/2020
Status: Active
Attachments: No files
Logo Logo
Loading...