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

RE: [amibroker] 52 Week High Q



PureBytes Links

Trading Reference Links

I don't follow. You are dividing and subtracting from 1.

You asked for the difference.

If you want difference in % then just divide my results by C.

 

L1 = C - LLV(C,260);

H2 = HHV(C,260) - C;

 

//Extra code to visualize results:

 

Plot(C,"",1,styleCandle);

Plot(L1,"L1",colorRed,styleOwnScale);

Plot(H2,"H2",colorGreen,styleOwnScale);

Plot(HHV(C,260),"\n52 Hi",colorDarkGreen);

Plot(LLV(C,260),"52 Lo",colorDarkRed);

 

 

    //Some encode colors in shorthand

    green = EncodeColor(colorGreen);

    red = EncodeColor(colorRed);

    blue = EncodeColor(colorBlue);

    black = EncodeColor(colorBlack);

    violet = EncodeColor(colorViolet);

 

    _N(Title = "{{DATE}} | Symbol: " + Name()

                   + "  |  Open: " + O + Green

                   + "  |  High: " + H  + Red

                   + "  |  Low: " + L  + Blue

                   + "  |  Close: " + C

                   + "\n{{VALUES}}");

 

 

(Extra code is too visualize results)

--

Terry

 

-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of John
Sent:
Wednesday, April 19, 2006 03:01
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] 52 Week High Q

 

Group,

 

I am trying to find how far the close is from the 52 week high/low.

I have:

L1 = ((C/LLV(C,260))-1);

H2 = (1–(C/HHV(C,260)));

 

L1 works in Ami

H2 works in excel but not in Ami.

tia,

 

j

 

 

 

 

 

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/

 

 



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