Help needed to get better indication of rising MA

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #76137 quote
    Allonso
    Participant
    New
    1.  indicator1 = ExponentialAverage[8](close)
    2.  indicator2 = WeightedAverage[50](close)
    3.  c1 = (indicator1[10] CROSSES OVER indicator2[10])
    4. 
    5.  indicator3 = Weighted Average[50](close)
    6.  indicator4 = Average[200](close)
    7.  c2 = (indicator3 >= indicator4)
    8.
    9.   indicator5 = Average[200](close)
    10. indicator6 = Average[200](close)
    11. c3 = (indicator5 >= indicator6[20])
    12.
    13. 
    14. SCREENER[c1 AND c2 AND c3] ((close/DClose(1)-1)*100 AS "%Chg yest.")

    Hi,

    I am not a coder but I try. In the above code (line-11) I have tried to find when the MA is higher than the period twenty days before. This works but there are many occasions when the MA’s are only marginally higher. This is really not what I want. Ideally I want cases when the MA is moving at a reasonably steep angle thereby providing a tradable move.

    Can anyone kindly suggest a way of achieving

    Regards  Allonso

    #76139 quote
    robertogozzi
    Moderator
    Master

    Be aware that ProScreener is limited to a 254-period lookback, now you reached 220 in line 11 (200MA + 20 lookback).

    Slope angles cannot be calculated, you can find several topics dealing with this. It’s not a fault of PRT, they simply cannot be calculated.

    You might use PIPS to be sure the distance between the two is not so small. Line 11 could be:

    c3 = (indicator5 >= (indicator6[20] + 10 * pipsize))

    to make sure their distance is at least 10 pips.

    #76142 quote
    Roberto S.
    Participant
    Average

    Hi Roberto, what do you suggest to use for stocks? tickSize * x times?

    Cheers

    R

    #76144 quote
    robertogozzi
    Moderator
    Master

    Sorry, but I do not trade stocks.

    #76145 quote
    Allonso
    Participant
    New

    Thanks Robertogozzi,

    Its a shame slopes are not included, my problem with your suggestion is how I find out what te tick size is of UK stocks. I have ggogled but no luck so far. Maybe I should see if a smaller MA say 150 period will still achieve what I want.

    Regards Allonso

    #76216 quote
    Allonso
    Participant
    New

    Hi All

    Following on from robertogozzi ‘s suggestion I used the changed code to test in four stock markets the:- Nasdaq, UK, German and NYSE. Using the factor (10*pipsize ) produced Zero results. Changing the factor to (0) and the results were in order (14, 4, 11, 19), using (1) and I got (3, 3, 0, 1) and using (2) results were (2, 1, 0, 1).

    So it seems the best method is to use (0) and eyeball the results making use of the colour change from Up to Down of the 200 MA. As a thought is it possible to code for this colour change as it must be calculated somewhere in the system. Perhaps some of you top coders could give it some thought.

    Regards to all    allonso

    #76222 quote
    robertogozzi
    Moderator
    Master

    Screeners do not support GRAPHIC instructions.

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

Help needed to get better indication of rising MA


ProScreener support

New Reply
Author
author-avatar
Allonso @allonso Participant
Summary

This topic contains 6 replies,
has 3 voices, and was last updated by robertogozzi
7 years, 6 months ago.

Topic Details
Forum: ProScreener support
Language: English
Started: 07/17/2018
Status: Active
Attachments: No files
Logo Logo
Loading...