Supply and demand rectangle?

Forums ProRealTime English forum ProBuilder support Supply and demand rectangle?

Viewing 6 posts - 1 through 6 (of 6 total)
  • #26272

    Hi all,

    10.3 looks promising on first look.

    Is it possible to create an indicator which draws a rectangle to indicate the closest supply and demand zones above and below current price.

    For example the last up candle before the most recent down move would be the bearish supply zone and I would like a rectangle to be drawn from that candle to the current bar. The rectangle would be the hight of that original candle.

    And inversley the last down candle before the most recent up move would be the bullish supply zone.

    It seems that maybe the zigzag indicator can be used to filter out the turning points to draw the rectangles from?

    Many thanks in advance,

    Phil

    #30242

    Hello, I’m also interested in this. I did a Google search for S+D zone indicators as well as educational blogs/articles to learn about it. Please bear w me and let me know if my findings are rubbish. 😀

    I’ve skimmed a couple dozen YouTube videos and website articles so far, and I liked the thought process behind this author’s writing the most. He critiques Sam Seiden’s S+D concept, in an obvious effort to distinguish his own product, but all these guys do. Be warned, his English grammar is not great.

    The first link is his approach to S+D, and it leads to about 10 or so blog articles detailing his approach. The second link is specifically his presentation on his S+D indicator for MT4, and the third link is simply where to get that MT4 indicator. If you think his approach is adequate, we can look at converting it into PRC.

    I’d love to ask Nicholas or one of the other prolific PRC contributors to take a look at this. I’ve coded a few very simple PRC indicators (currently working on a market time of day color indicator on candlestick price that I’ll post when it is less broken 😛 ), but I’m still at a loss for how to code this S+D indicator, esp with its color change when a zone is retested.

    http://www.forexmentoronline.com/the-official-supply-and-demand-trading-guide/

    http://www.forexmentoronline.com/a-simple-supply-and-demand-indicator-you-can-use-on-mt4/

    https://www.forexfactory.com/showthread.php?t=428268

    #30377

    Supply and demand zones have great potential for sure, but there are a billion ways to recognize and draw them on charts.

    I can help for sure create an indicator that draw this kind of areas, but you’ll have to define first how to spot them in common words.

    #30389

    Hi, Nicolas. Thank you for your interest and help. I will try to provide such a definition here. Let me know if it is poorly defined. I’m continuing to look up different ways of drawing S+D zones.

    Defining the base of consolidation (a series of candles trading in a tight range relative to the breakout candle):

    Looking at a certain candlestick (C), look back and define X set of previous contiguous candles that are in total sufficiently smaller than C (“smaller” defined as X set open/close range is Y% of C; e.g. 50% or .5); stop looking back when X open/close range exceeds Y%. If X >= threshold value set by user, draw a zone. (i.e. user filters out less significant zones) This should draw multiple S+D zones for multiple candles C, not just a most recent one.

    Defining first height H1 of S+D zone rectangle:

    From the X candles, choose the most recent candle (D) with up/down direction opposite of C. S+D zone first height is set by D’s opening value.

    Defining second height H2 of S+D zone rectangle:

    Within user-defined Z number of candles to look back, if C is up, find the lowest low of Z. If C is down, find the highest high of Z. (Z should be >= X) S+D zone second height is this value of lowest low or highest high.

    Defining first x coordinate of rectangle:

    It is the earliest/oldest of the two heights.

    Defining the second x coordinate of rectangle:

    Continues to current candle

    Color conditions for the S+D zone:

    If H2 is < H1, color as “demand” zone for buying (green?).

    If H2 is > H1, color as “supply” zone for selling (red?).

    If a candle after C touches the zone such that (high/low/close) falls between H1 and H2, color zone as gray.

     

    #30417

    I’m going through the PRC functions right now. To implement my first part (defining the base), I know I have to call a candle previous to the candle being looked at (C). I would compare its open and close, then store the lower value in variable Low, and the higher value in variable High. Then I have to call the next previous candle (two prior to the candle C), compare its open and close to the variables Low and High, and either one exceeds the current values of Low and High, store the new value instead.

    My first problem is a beginner’s question of syntax: how do I call the previous candle open and the previous candle low? I think from there I can use a while loop to keep checking prior candles with n+1 or n-1. I apologize if this question is absurdly obvious — I can’t figure it out from the PRC programming guide, or else I missed it.

    After that, I would check the absolute value of the (High – Low)/(C candle’s open-close) <= Y%

    I’d also have to store a running counter of candles in variable X.

    This candle call syntax would also let me look for H1.

    #30449

    Yes, the easy way to check previous candlesticks OHLC from now is to set a loop through history:

    This way, you can do your own calculation and comparison inside the loop.

     

Viewing 6 posts - 1 through 6 (of 6 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login