PureBytes Links
Trading Reference Links
|
Ara,
I can't remember who coded this but it works:
_SECTION_BEGIN("Market Profile");
//Market Profile
SetBarsRequired(100000,100000);
//===========================
//BV = LastValue(ValueWhen(Status("barvisible") <
Ref(Status("barvisible"), -1), BarIndex()-1), 1);
//BB = IIf(BV == 0 , LastValue(BarIndex()), BV);
LV = LastValue(BarIndex());
Plot(C, "Close", colorBlack, styleLine+styleThick);
//===========================
qq = Param("Density", 100, 50, 300, 50);
n = Param("# days to graph",1,1,100,1);
//===========================
NewDay = IIf(Day() != Ref(Day(), -1) OR BarIndex() == LV, True, False);
//Plot(NewDay, "", 0, 2 + 32768 + 4096, Minvalue = 0, Maxvalue = 1);
//===========================
Bot = TimeFrameGetPrice("L", inDaily, 0);
Top = TimeFrameGetPrice("H", inDaily, 0);
Range = Highest(Top-Bot);
//Plot(Bot, "", 0, 512);
//Plot(Top, "", 0, 512);
//===========================
Box = Range/qq;
for (k=0; k<qq; k++) // loop through each line (price) starting
at the lowest price
{
//tpo[k]=0;
Color = colorCustom3;
Line = Bot + k*Box;
for(i = LV-n*6.5*3600/Interval(), j=0, Ctr=1; i<LV; i++) {
if(NewDay[i] == True) {
j = i;
}
if(Line[i] >= L[i] & Line[i] <= H[i]) {
Color[j] = colorCustom7;
// printf("Line[i] = %3.2f tpo[k] = %1.0f ctr= %1.0f\n",Line[i], Ctr,
tpo[k]);
j++;
// tpo[k]=Ctr++;
}
}
Plot(IIf(Line > Top OR Interval() >= 86400, Null, Line), "", Color,
styleDots+styleNoLine+styleNoLabel);
}
GraphXSpace = 0.05;
Title = "{{NAME}} - {{INTERVAL}} {{DATE}} - Market Profile : {{VALUES}}";
_SECTION_END();
*********************************
On Sun, 11 Sep 2005 17:52:36 -0400, Ara Kaloustian <ara1@xxxxxxxxxx> wrote:
>
> Tomasz,
>
> if we could have capability of plotting vertical lines with LineArray(),
> it would be possible to create market profile plot.
>
> This seems to be getting popular again...
>
> Ara
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a difference. Find and fund world-changing projects at GlobalGiving.
http://us.click.yahoo.com/PcNrnD/PbOLAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~->
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|