PureBytes Links
Trading Reference Links
|
Goldwing,
try this in indicator builder:
NVI1=IIf(V < Ref(V,-1), Ref(NVI(),-1) + (C - Ref(C,-1)) / Ref(C,-1),IIf (V
>= Ref(V,-1) ,Ref(NVI(),-1),Null));
Plot(NVI1,"",colorRed,styleLine);
The shape of this indicator is similar to the built-in Negative Volume
Index..NVI()....
Anthony
----- Original Message -----
From: "goldwing01" <GOLDWING01@xxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Saturday, December 27, 2003 9:10 PM
Subject: [amibroker] help with code please
> I have been trying for two days to make this work, just
> have not made it work,so now asking for help.
>
> (V < (ref(V,-1)) then
> NVI = I + (((C - ref(C,-1) / ref(C,-1)))
> If (V >= ref(V,-1)) then
> NVI = I
>
> Where:
>
> C = Today's closing price
> ref(C,-1) = Yesterday's closing price
> I = Yesterday's Negative Volume Index
> NVI = Today's Negative Volume Index
> V = Today's volume
> ref(V,-1) = Yesterday's volume
>
> ________________________________________________________
> this is what I have done up to now.
>
> I= Cum(IIf(V<Ref(V,-1),ROC(C,1),0));
> MA1 = NVI()<= I + (C -Ref(C,-1) / Ref(C,-1));
> MA2=NVI() <= I;
>
> col = IIf( V < Ref( V, -1), colorGreen, colorRed );
> Col2= IIf(V > Ref(V,-1),colorGreen, colorRed );
>
> Plot(V, "Price",Col, MA1, styleBar );
> Plot( V, "Price",Col2, MA2, styleBar );
>
>
>
> Send BUG REPORTS to bugs@xxxxxxxxxxxxx
> Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.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/
>
>
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.556 / Virus Database: 348 - Release Date: 12/26/2003
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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/
|