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

Re: [amibroker] Re: How to draw a line using code



PureBytes Links

Trading Reference Links

Sorry, I misunderstood. Here is standard formula for connecting 2 points:

Steve

Slope = ( Price2 - Price1 ) / ( Bar2 - Bar1 );
Offset = Price1;
Line = ( Bar - Bar1 ) * Slope + Offset;


----- Original Message ----- 
From: "nkis22" <nkishor@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, July 03, 2005 2:41 PM
Subject: [amibroker] Re: How to draw a line using code


> Thanks Steve. It gives me a line at 30 day high, but I want the line 
> connecting 30 day high with 10 day high, so often this will not be a 
> horizontal line but a sloping one
> 
> nand
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Steve Dugas" <sjdugas@xxxx> wrote:
>> Hi Nand,
>> 
>> Haven't tested it, but I think this would do it:
>> 
>> ThirtyDayHighLine = IIf( BarIndex() >= BarCount - 30, HHV( High, 
> 30 ), 
>> NULL );
>> Plot( ThirtyDayHighLine, "30 Day High", colorRed, StyleLine );
>> 
>> Steve
>> 
>> ----- Original Message ----- 
>> From: "nkis22" <nkishor@xxxx>
>> To: <amibroker@xxxxxxxxxxxxxxx>
>> Sent: Saturday, July 02, 2005 8:47 PM
>> Subject: [amibroker] How to draw a line using code
>> 
>> 
>> >I want a line drawn from HHV in 30 days and HHV in 10 days, that 
> is 30
>> > day H and 10 H points. I can find the values, but how do I get a 
> line
>> > spanning 30 days? Any help will be much appreciated.
>> >
>> > nand
>> >
>> >
>> >
>> >
>> >
>> > 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
>> >
>> >
>> >
>> >
>> >
>> >
>> >
> 
> 
> 
> 
> 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
> 
> 
> 
> 
> 
> 
>



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/