[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] LineArray() - Suggestion



PureBytes Links

Trading Reference Links

Bill

Thanks for
finding this ...
Tried the code, but get error in line Ref(Status....   ... I marked the line
below

Looks like it's a test wrap problem but am not sure.  Appreciate if you
would check the test as it appears in this email

Ara

----- Original Message ----- 
From: "Bill Schmidt" <wjschmidt@xxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, September 12, 2005 10:36 AM
Subject: Re: [amibroker] LineArray() - Suggestion


> 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);                     //
<==== Problem area
> //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
>
>
>
>
>
> 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
>
>
>
>
>
>



------------------------ 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/