Scanning multiple timeframes at the same time

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #165318 quote
    Geoffrey Toplis
    Participant
    New

    Hi there,

     

    I am wondering if there is a way for the scanner to scan multiple timeframes at once with different variables for each scan

     

    I am running the same indictor for each time frame with slightly different variables for each. It would be great if the scan would happen for all of them and display accordingly instead of having to re-run for each different time frame

     

    Geoff

    #165324 quote
    robertogozzi
    Moderator
    Master
    #165326 quote
    Geoffrey Toplis
    Participant
    New

    Thank you I am having trouble adding this code

    // sample screener code
    SCREENER(close as "close")
    //RSI Divergences By Frank (Francesco)
     
    //Description: the indicator draws arrows on chart as entry points when a direct or an hidden RSI divergence is found.
    //When a DIRECT divergence is found, "dd" (direct divergence) text is added to chart over (Sell signal) or under (Buy signal) the arrow
     
    //When an HIDDEN or INVERSE divergence is found, "hd" (hidden divergence) text is added to chart over (Sell signal) or under (Buy signal) the arrow
     
    //Variables:
    RsiPeriod     = 7    //number of bars to calculare RSI value
    RsiOverSold   = 100    //Oversold Level
    RsiOverBought = 0    //OverBought Level
    MinBarRange   = 4     //minimum distance from two consecutive RSI Highs or RSI Lows
     
    //Rge = averagetruerange[7](close)
    MyRSI = rsi[RsiPeriod](Close)
     
    //ONCE ShiftText = 3
     
    RsiMax = MyRSI < MyRSI[1] and MyRSI[1] > MyRSI[2] and MyRSI[1] > RsiOverBought
    RsiMin = MyRSI > MyRSI[1] and MyRSI[1] < MyRSI[2] and MyRSI[1] < RsiOverSold
    Cond = 0
    if RsiMax then
    RSIMax1 = MyRSI[1]
    High1 = High[1]
     
    for I = MinBarRange to  80
    if RsiMax[I] then
    RSIMax2 = MyRSI[I + 1]
    High2 = High[I + 1]
    If High1 > High2 and RSIMax1 < RSIMax2 then
    elsif High1 < High2 and RSIMax1 > RSIMax2 then
    //DRAWARROWDOWN(barindex, High + Rge / ShiftText)coloured(255,192,203,255)
    //DRAWTEXT("hd", barindex, High + Rge / ShiftText / 0.2,SansSerif,Italic,10)coloured(0,0,255,255)
    Cond = 1
    endif
    break
    endif
    next
    endif
     
    if RsiMin then
    RSIMin1 = MyRSI[1]
    Low1 = Low[1]
    for I = MinBarRange to  80
    if RSIMin[I] then
    RSIMin2 = MyRSI[I + 1]
    Low2 = Low[I + 1]
    If Low1 < Low2 and RSIMin1 > RSIMin2 then
    elsif Low1 > Low2 and RSIMin1 < RSIMin2 then
    //DRAWARROWUP(barindex, lOW - Rge / ShiftText)coloured(0,0,255,255)
    //DRAWTEXT("hd", barindex, lOW - Rge / ShiftText / 0.2,SansSerif,Italic,10)coloured(0,0,255,255)
    Cond = 2
    endif
    break
    endif
    next
    endif
     
    SCREENER[Cond](Cond AS "Cond")
    

    Keep getting errors when I try and replace the indicator in the original code

    #165327 quote
    robertogozzi
    Moderator
    Master

    Remove lines 1 and 2.

    Line 61 does the job.

    Geoffrey Toplis thanked this post
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Scanning multiple timeframes at the same time


ProScreener: Market Scanners & Detection

New Reply
Author
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by robertogozzi
4 years, 11 months ago.

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