New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.


Hi everyone!

How can I scan for a flat SMA200 line for at least more than a week???

thanks for help!

Best Answer

  • Answer ✓
    Is there a way to scan for a flat SMA 200 that is "flat" within a 10% range?


  • By "flat" you mean equal in value for more than 5 days? Today's SMA200 = 1 day ago SMA200 and 1 day ago SMA200 = 2 days ago SMA200 and 2 days ago SMA200 = 3 days ago SMA200, etc, etc, etc. For that to happen you'd need a miracle, or a stock that doesn't move much over 200 days.

    Sounds like a you might need a range. The link explains how to write code for establishing flat or consolidation.
  • Thanks for your answer!

    really appreciated.
  • I think if you use the min/max function as described in the link in the previous answer and substitute sma(200, close) for close it should work.

    You have to decide how long the 10% range is (number of days you want). Then you want 1.1 and .9 for multipliers.
Sign In or Register to comment.