Hi

I am having problem with a calc that I have worked around by manually
drawing the lines each morning on the different timeframe charts i
use. I have a calc that loops many many times and kills performance.

I think that i would be able to calc this while loop (once) and then
put the "roundedValue" to be plotted as a price s/r line in an array,
then just call the array continiously to plot the line as the day
progreses.

Is this correct thinking? If so, can someone point me in the right
direction to achieve this... If not don't laugh to hard at my
backwards thinking :) thanks for any help

PlotOHLC(O,H,L,C,"",colorBlack, styleCandle);

HHVBarsH = HHV(H, 100) ;
LLVBarsL = LLV(L, 100) ;
step = 8;
//maxDegreesZero = round(HHVBarsH);
//degreesZero = round(LLVBarsL);
maxDegreesZero = 900;
degreesZero = 1;
increment = 1;
degreesValueInt = 0;
angleFactor = 0;
sqrtDegreesZero = 0;
degreesValue = 0;
LastBar = BarCount-1;


while (degreesZero < maxDegreesZero)
{
sqrtDegreesZero = sqrt(degreesZero);

for (angle = 0; angle < 360; angle = angle + 11.25)
{
angleFactor = (angle / 360.0) * 2.0;
degreesValue = (sqrtDegreesZero + angleFactor) ^ 2;
roundedValue = round(degreesValue);

if (roundedValue[LastBar]< (HHVBarsH[Lastbar]) AND
roundedValue[LastBar]>(LLVBarsL[Lastbar]) ){
Plot(Prec(roundedValue,2), "",
colorGrey40,styleLine, -(LLVBarsL[Lastbar]),(HHVBarsH[Lastbar]));
}

}

degreesZero = degreesZero + increment;
increment = increment + step;
}

Title = Interval(2) + " " +
WriteVal( SelectedValue( DateTime() ),
formatDateTime) ;







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Great things are happening at Yahoo! Groups.  See the new email design.
http://us.click.yahoo.com/qlNZQC/hOaOAA/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:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to