Price bouncing over horizontal support on SMA 200 + Fibonacci 61.8% retracement

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #78817 quote
    OlivierLarue
    Participant
    Average

    Hi, I would like to create a screener in which the rules would be :

    • Stock which was uptrending
    • Then fell onto a horizontal price support which happen to be in line with/on the same level as :
    > SMA 200
    > Fibonacci 61.8% retracement level from previous rise (swing low to swing high point).

    The purpose is to use a combination of signals/confluence in order to find highly probable trading setups.

    How can one achieve such a screener ?

    Thank you

    #78818 quote
    OlivierLarue
    Participant
    Average

    Here is the type of setup I’m trying to achieve…
    Ticker : NASDAQ:MOMO
    Date : 2016-12-19

    Screen-Shot-2018-08-22-at-23.27.48.png Screen-Shot-2018-08-22-at-23.27.48.png
    #78891 quote
    Nicolas
    Keymaster
    Master

    In order to code your request, please help us to define:

    1. Stock which was uptrending
    2. swing low to swing high point (how to find these points?)
    OlivierLarue thanked this post
    #78899 quote
    OlivierLarue
    Participant
    Average

    Hi Nicolas,

     

    1) Uptrending
    We could say that the highest point (the one before the retracement) was above it’s SMA 50 and SMA 200 ?
    You may have a better idea on the subject ?

     

    2) Swing low to swing high
    I have to admit it’s a difficult one…
    I was trying to define it in simple words and even though the human brain can see at first glance the significant line on the chart, it’s not so easy to write a rule for this…

    Ideally it would be the lowest point, on the same(ish) angled line (trendline) which lead to the highest point until it retraced.
    I think it may be very difficult to write as computer code in which things are binary…

    So I was thinking maybe using the ZigZag indicator to find the lowest and highest points over a loopback period ?
    So we would just have to run the screener a few times with a different period parameter ?

    As on the first point, you may have a better idea ?

    Thank you so much for everything you have been doing on this forum 🙂

    #78904 quote
    OlivierLarue
    Participant
    Average

    Here is another example on the same stock (NASDAQ:MOMO) at the time of writing (2018-08-24).

    • The 200 moving average is not exactly 61.8%, but quite close (may be the rule should be between 55% and 65% retracement ?)
    • The support is strong

    The result was a 25% rise in just 7 days…

    example-2.png example-2.png
    #78920 quote
    OlivierLarue
    Participant
    Average

    As well I think it would be interesting to add that the price didn’t go below the current price since the highest point of the retracement.
    So we get the 1st rebounce on that fibonacci level.

    #79233 quote
    Nicolas
    Keymaster
    Master

    1/ counting how many times the MA50 had been above the MA200 is a common and simple rule to determine an uptrend. How course, you’ll have to determine a threshold for the count value to confirm the trend.

    2/ storing the lowest low value while MA50 is below MA200 and the highest high while it is above could be a good idea.

    Let me know your thinking about these 2 proposals.

    #79267 quote
    OlivierLarue
    Participant
    Average

    Yes Nicolas, that sounds great to me.

    #79293 quote
    Nicolas
    Keymaster
    Master

    This first rough version is a first try and does not find the good LL and HH:

    uptrendThreshold = 20 //periods
    
    //indis
    ma200=average[200]
    ma50=average[50]
    
    //reset highest high and lowest low
    if ma50 crosses under ma200 then 
    ll=low
    endif
    if ma50 crosses over ma200 then
    hh=0
    endif
    
    //compute hh and ll
    hh=max(hh,high)
    ll=min(ll,low)
    
    //confirmed uptrend
    uptrend = summation[uptrendThreshold](ma50>ma200)=uptrendThreshold
    
    //retracement 61.8
    percent = (close-ll)/(hh-ll)
    retrace = percent>=0.55 and percent<=0.65 
    
    //global test
    test = uptrend and retrace and ll>0 and hh>0
    
    screener[test](percent)

    My proposal for point 2 was not a good idea since moving average are obviously suffering from lag the saved LL and HH are not the ones we are looking for. I let you doing some tests and try to find a better way to find them 🙂

    I still did not add any condition on the price bouncing on MA200.

    OlivierLarue thanked this post
    #79430 quote
    OlivierLarue
    Participant
    Average

    Thank you so much Nicolas, I’ll investigate see if I can come up with some other rules 🙂

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

Price bouncing over horizontal support on SMA 200 + Fibonacci 61.8% retracement


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
OlivierLarue @olivier7 Participant
Summary

This topic contains 9 replies,
has 2 voices, and was last updated by OlivierLarue
7 years, 6 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 08/22/2018
Status: Active
Attachments: 2 files
Logo Logo
Loading...