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.

this is a scan that i cantr seem to create

Dear Scan
How do i write a scan which says that:
1. Price is at or up to 4% above the 10 day EMA but below the 200day EMA by between 5% and 1%
2. price of 10day has just turned positively sloped as compared to 1 day ago or lets say 2 days ago?
Best regards
Mark

Comments

  • Post what you have and we'll tweak it.

    It's not complicated. It's just long. One statement for each condition, except if you have compound conditions (e.g. between) you might need more.

    For your first condition, you are actually asking for prices to be in a range, so have to specify the upper bound and the lower bound. Use decimals to express per cents. For instance, price above an ma by up to 4% would be close <= ma * 1.04. Below by 5 % would be close > ma * .95. For the other bound, testing that price is above the ma, close > ma. For price below the ma, close < ma.

    For the second condition, an the first up tick in a ma would just be ma > 1 day ago ma. But to capture a previous down slope you would say 1 day ago ma < x days ago ma. You would have to adjust the number of days ago for the kind of turn you want to capture.
  • dear Mark, thanks for your response. Its greatly appreciated. I will work on this and send you a response tomorrow.
    Best
    Mark
Sign In or Register to comment.