Identifying pullbacks to a moving average

Optuma Forums Optuma Scripting Identifying pullbacks to a moving average

This topic contains 0 replies, has 1 voice, and was last updated by Darren Darren 6 months, 2 weeks ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #44659
    Darren
    Darren
    • Topics: 25
    • Replies: 110
    • Posts: 135

    Here’s an example of a scan to show which stocks are above  – but within 3% – of their 50-period moving average, but there has been a recent pullback towards it. In this example the pullback is defined by the direction of the 5 day moving average, i.e. it’s sloping down:

    // create variables for the MA values
    MA1 = MA(BARS=5, CALC=Close);
    MA2 = MA(BARS=50, CALC=Close);
    // Create logic formula
    MA1 IsDown and CLOSE() > MA2 and CLOSE() < (MA2 * 1.03)

    Remember you can open the scan results as a Watchlist and open charts, add additional columns, etc. Then when that workbook is saved and is re-opened the scan will run automatically and the list will be updated. Here’s the current list of the ASX 200 companies that meet the above scan:

    Capture

     

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

Pin It on Pinterest

Share This

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close