Raajesh,
Your problem is not clearly defined. Without some acceleration
towards the price, there is no reason for the line to flip above or below as
does the SAR.
Changing the line style is the most basic of operations.
Go to Help and type PLOT under the Index tab for a list of styles.
Try the code below. Makes somes changes. If that doesn't get
the desired result, provide a better description of the problem and I will be
happy to help you solve the problem, short of writing all the code for you.
Plot(C,Name(),colorBlack,styleCandle);
per = Param("Periods",20,5,100,1);
Highs = HHV(H,per);
Lows = LLV(H,per);
Plot(IIf(Highs > C,Highs,Null),NumToStr(per,1.0) + " bar HHV",colorGreen, styleDots|styleNoLine);
Plot(IIf(Lows < C,Lows,Null),NumToStr(per,1.0) + " bar LLV",colorRed,
styleDots|styleNoLine);
--
Terry
-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of
Raajesh
Sent: Sunday, November 20, 2005 23:03
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] Please help in coding a loop involving formula
Hi Terry,
Yes....I did try taking the help of SAR formula, but
was confused with the formula of (if...else).
Can you please code it for me? I have been trying to
code it but with my limited knowledge, I have not been
successful. Kindly help me out......buddy.
Thanks and regards,
Raajesh
--- Terry <MagicTH@xxxxxxxxxxx> wrote:
> There is full code for PSAR in the members section
> that you can modify.
> http://www.amibroker.com/library/formula.php?id=268
> --
> Terry
>
> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx
> [mailto:amibroker@xxxxxxxxxxxxxxx] On
> Behalf Of sarani_in
> Sent: Saturday, November 19, 2005 04:55
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Please help in coding a loop
> involving formula
>
> Hi guys,
>
> I am trying to code an indicator similar to
> parabolic SAR with
> following difference.
>
> Instead of tracking and accelerating to high/low,
> this indicator only
> resembles last 20 days HHV/LLV, and just like SAR,
> it only shows HHV
> or LLV depending on the today's close.
>
> Further instead of dots, I request this to be in
> STYLELINE which
> changes colour (on shifting from above to below the
> close and
> viceversa).
>
> Thanks in advance....
>
> Regards,
>
> Raajesh
>
>
>
>
>
>
>
>
>
>
> 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
> --------------------~-->
> Try Online Currency Trading with GFT. Free 50K Demo.
> Trade
> 24 Hours. Commission-Free.
>
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/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
>
>
> amibroker-unsubscribe@xxxxxxxxxxxxxxx
>
>
>
>
>
((((( Raajesh Jariwala )))))
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
------------------------ Yahoo! Groups Sponsor
--------------------~-->
Try Online Currency Trading with GFT. Free 50K Demo. Trade
24 Hours. Commission-Free.
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/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/