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.


Sorry to trouble this forum, but I'm stuck...I am trying to write a formula that screens for this:
[Daily Close=.5* DAILY Lower Price Chan(60) - ((Upper Price Chan(60) - (Lower Price Chan(60))]
EXPLAINED: Whatever the distance is between Upper and Lower Price Chan, I want to find stocks that travel an equal distance to that midpoint, but BELOW the lower price channel line. The above returns syntax errors and I can't nail the cause. Thanks in advance.


  • [Daily Close=.5* DAILY Lower Price Chan(60) - ((Upper Price Chan(60) - (Lower Price Chan(60))]

    Several problems here.

    1 - (very, very) rarely do you want to use the "=" (equals) operator with price, because it's expressed in pennies and the chances price will hit a number you specify in a scan are nil. So, you are looking for a crossover, so use the "x" operator, explained here:

    2 - You don't have to calculate the channel mid-point - it's a value available in the Technical Indicator drop down as "and [Middle Price Chan(20) < close]", which you can edit (p.s. - your calculation doesn't pass syntax because you are using parentheses ( ) instead of brackets [ ] to group upper and lower price chan.

    3 - You need to specify a point in time in the past (10 days ago, 40 days ago, whatever) for your calculation of the distance from the channel midpoint to the lower (or upper) channel. It changes with price action. This assumes you are not looking for a one day drop to the target price. If you are, then you don't need the time offsets.

    So it might be:

    and [[30 days ago Upper Price Chan(60) - 30 days ago Middle Price Chan(60)] x close]

    (see link above for "x" to see why the order is what it is)

    (if you subtract the mid chan price from the upper chan price, you get the lower chan price minus the distance between the mid and upper chans; e.g.

    upper = 20, lower = 10, mid = 15;
    distance between mid and upper is 5;
    so, 10 - 5 = 5,
    but 20-15 = 5 also).

  • MARK'D: super helpful. Thank you so much. I learn tons from reading your answers. Don't know how you acquired so much knowledge. Am envious. Thank you for being so helpful to all of us on this forum!!
Sign In or Register to comment.