Price Density Index -
1 2 3 4

thread: Price Density Index

  1. #11
    Opie, yea that rainbow look is I kind of view it mentally. I am uncertain how to draw on that tho not the way I want it. I think I have the array problem solved tho.

    What I watch for this indior is one that shows in a seperate window such as cci or stochastics. This would give you the ability to look back to find out if the indior is supplying the needed information.
    Perhaps, but what would you plot that in a window? Remember that we're discussing a varied set of prices, not only 1, and seeing it overlayed on price information would make it more easy to find out what prices it pertains to. We are basically trying to observe areas of congestion on the chart, not merely how congested the current price is.

    I am not certain how congestion relates to S/R, but S/R can be done basically the same way. Run a density of 20 or 10 pub alloion for 20 bar highs or 10 and assistance for resistance. Unless I am missing something, I feel that'd work.

    What I need to know is on previous candles or perhaps the current candle do you wish to utilize the large, low, open, close or maybe a median value of the candle or another price.
    All prices from low to top would have to be incremented.

  2. #12
    Hmm, comparable... maybe I can use the polygon process.

  3. #13
    Interesting. That histogram look seems workable. Thank you, dito. I overlooked that ribbon.

  4. #14
    This is very interesting, let's see if there's a coder around that's able to put this egy collectively...

  5. #15
    Member
    70
    The simplest way would have to be some kind of 2 matrix.

    One axis is for Price, another for Hit count

    Here is how I'd conceptualize this indior:Loe the range of prices within a particular number of bars. (Let's say 200) For each price point, add 1 for every pub where the price line falls between the low and high. Draw a specifically coloured line for each price point. I will do just about all the coding except array work.

  6. #16
    Junior Member galanmovil2's Avatar
    24
    The issue with the arrays ? If I understand the first post correctly, use the following pseudo code

    1) Establish (or calculate) the top and lower limts of the price range your interested in.
    EG top = 1.8600
    reduced = 1.8500

    2) specify (or order) that the granularity of bands your interested in.
    EG bandwidth= 10 (pips)

    3) calculate the amount of bands on your range
    nbands = ((upper-lower)/Point) /bandwidth

    4) size a dynamic array to store the counts

    int bandsarray[][1]
    arrayresize(bandsarray,10);


    5) initialise array
    for x = 0 to 9 bandsarray[x][0] = 0;


    6) loop throughout and total into the array

    barpos = ????
    /// iterate pubs
    Whilst barpos gt;= 0

    bandpos =0;
    /// iterate bands
    Whilst bandpos lt; nbands

    double tprice = lower ((bandpos*bandwidth)*Point);
    if (tprice gt;= Reduced[barpos]) (tprice lt;= High[barpos])
    bandsarray[bandpos][0] ;
    bandpos ;


    barpos--;


    7) filter and display as appropriate

  7. #17
    I was able to finish this only to find out there's a indior called market profile that's been designed w/ an entire system of trading. Start looking for this, you'll find it.

    The problem w/ arrays is that there's a series of oddities in the manner MT4 handles arrays. I would call them bugs, honestly, but whatever. I had another post on this subject found one work-around, but there are conditions. Long story short, arrays don't always work. And the more complied they are, the less likely they are supposed to work. The largest problem I had was w arrays does not manage them with the way it should.

  8. #18
    I managed to finish this just to find out there is a similar indior called market profile that's been developed w/ an whole system of trading. Start looking for this, you'll discover it.

    The difficulty w/ arrays is that there is a succession of oddities from the way MT4 handles arrays. I'd call them bugs, frankly, but anything. I had another post on this subject discovered one work-around, but there are circumstances. Long story short, arrays don't always work. And the more complied they are, the less likely they are supposed to get the job done. The largest difficulty I had was w arrays, MT4 does not manage them.
    Do you feel this variety issue would be correct once MT5 comes out? I thought that I heard they're working on particular protocol/language fixes with MT5...

  9. #19
    I can see how this might be successful when looking at weekly candlesticks (using the density overlayed...)

    it would show in which the resistance/support (whatever you want to call it) was through the prior week...

    might even be handy for monthly also...

  10. #20
    Junior Member Oxso0's Avatar
    15
    (Old thread but interesting topic so I thought I could reply)

    I've done a similar overlay a while past, it doesn't seem lower timeframes just the same timeframe but determine if this really is what you are looking for. So that it's not precisely what you are looking for but likely quite close highs/lows are looked at by it.

    Code as well as image is at another site, here is the url
    http://www.forex-tsd.com/177626-post525.html

  •