Help for code Screener on two time frames using Parabolic, Bollinger, MACD

Forums ProRealTime English forum ProScreener support Help for code Screener on two time frames using Parabolic, Bollinger, MACD

Viewing 6 posts - 1 through 6 (of 6 total)
  • #60551

    Hi Again,

    I would appreciate your assistance for a code screener. I have a good talent to complicate things.

    For this screening I must use 7 and 23 period moving averages, Parabolic SAR, MACD, Stochastic and Bollinger Bands on two timeframes: daily and weekly. The settings of the indicators are a little bit different:

    1. 7 and 23 period simple moving averages
    2. MACD (9, 17,6)
    3. Stochastic (15, 5, 5) – method: exponential
    4. Parabolic, default settings (0.02, 0.02, 0.2)
    5. Bollinger Bands, default settings (20,2), the only exception is that an average of high, low and close must be used.

    Now I write some abbreviations to avoid writing long sentences.

    1. Price (1) = today’s price at close
    2. Price (8) = price at close in the 8th day (8 days ago)
    3. Parabolic SAR (1) = parabolic SAR as today
    4. M7 (1) = 7 period simple moving average as today at close
    5. M23 (1) = 23 period simple moving average as today at close
    6. M7 (2) = 7 period simple moving average as yesterday at close
    7. M23 (2) = 7 period simple moving average as yesterday at close
    8. UB (1) = upper Bollinger Band as today
    9. UB (2) = upper Bollinger Band as yesterday
    10. LB (1) = lower Bollinger Band as today
    11. LB (2) = lower Bollinger Band as yesterday
    12. (UB-LB) = difference between upper and lower Bollinger Bands
    13. Max(UB-LB)50 = largest difference between upper and lower Bollinger Bands in the last 50 periods
    14. Max(UB-LB)100 = largest difference between upper and lower Bollinger Bands in the last 100 periods
    15. BMA = Bollinger moving average
    16. %K = slow down fast %K by exponential moving average
    17. %D = slows down %D by exponential moving average – see attached excel spreadsheet for calculations)

     

     

    To enter

    Indicator Timeframe – week Timeframe – day
    price Price (1) > price (8)

    Price (1) > parabolic SAR (1)

    Price (1) > price (8)

    Price (1) > parabolic SAR (1)

    7/23 M7 (1) > M23 (1)

    M7(1) > M7 (2)

    M23 (1) > M23 (2)

    M7 (1) > M23 (1)

    M7(1) > M7 (2)

    M23 (1) > M23 (2)

    Bollinger Bands UB )1) > UB (2)

    (UB – LB) < or = 0.7*(UB – LB)50

    UB )1) > UB (2)

    (UB – LB) < or = 0.5*(UB – LB)100

    LB (1) < LB (2)

    MACD MACD > Signal MACD > Signal
    Stochastic %K > %D %K > %D
    Volume 500 000

     

    To exit

    Indicator Timeframe – week Timeframe – day
    Price, Parabolic SAR and Bollinger moving average Parabolic (1) > price (1) (price closes bellow parabolic SAR)

    BMA (1) > Price (1) (price closes bellow Bollinger moving average)

     

    Thank you very much,

    Petru

    #60571

    Hi, in that case I’m moving your post to the pro-screener forum, where it has more chances to be read by members able to help in that area

    For future reference, the list of PRC forums to choose from is here: https://www.prorealcode.com/forums/

    Regards

    #60702

    Hi,

    I am considering myself very lucky that I discovered this forum with lots of great people that share their ideas and very helpful.

    I am using excel spreadsheets to back test my idea (if some is interested please let me know and I will share it with you), but to find opportunities unfortunately it is impossible to screen the market using excel. My programming skills are not great, but I determined to learn even I am not young.

    I would like to explain my previous message. I want to screen on two different timeframes, week and day, in a bullish market.

    On both time frames parabolic should serve as support and price at close must be higher than the price at close on the 8th day. The short (7 period) and long (23 period) simple moving averages should trend upward direction with short moving average above long moving average. MACD must be greater than signal and for stochastic %K greater than %D (not necessarily on daily timeframe).

    On daily timeframe we should see a Bollinger squeeze, upper and lower bands should be at minimum compared to the past 100 days. A bullish closing price above the upper Bollinger band with a divergence of bands and a %K greater than %D for stochastic should give a buy signal.

    For exit I am going to use excel since I feel more comfortable, this until I will improve my programming skills. Exit signal will be given when parabolic SAR becomes resistance and price closes below Bollinger moving average on the weekly timeframe.

    I know it is a very very difficult to get to taste the success, but this is something that I like. Thank you all for making this forum wonderful.

     

    Best Regards,

     

    Petru

    #60839

    Thanks for the explanation @Petru, let’s see what I can do for help.

    1 user thanked author for this post.
    #60840

    Here is the code of the screener you requested:

     

    #60899

    Thank you very much Nicolas,

    I just got home and now I am trying your code. Thank you again for helping me.

     

    Best Regards,

     

    Petru

Viewing 6 posts - 1 through 6 (of 6 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login