PureBytes Links
Trading Reference Links
|
Alan,
Try this: load into indicator builder.
// % above or below Moving average
pds=10;
Price=Foreign("^VIX","C");
Mov_avg=EMA(price,pds);
z=((price / Mov_avg)- 1) * 100 ;
Cond=IIf(z >= 10,1,0) OR IIf(z <= -10,1,0);
PlotForeign("^VIX","VIX",colorBlack,styleCandle);
PlotShapes(IIf(Cond,shapeDigit1,shapeNone),colorRed);
//For AA window
Filter=1;
AddColumn(C,"close");
AddColumn(Mov_avg,"20ma");
AddColumn(z,"%");
Anthony
Alan Nouray wrote:
> I am trying to write a formula that plot a shape (any shape) on the
> price graph when the difference between VIX and its 10day EMA is more
> than 10%.
>
> I came up with the following
>
> x=foreign("^VIX","C");
> y=ema(x,10);
>
> But I do not know how to write the code for the plotting the shape if
> the difference between VIX and its 10 day EMA is more than 10%.
>
> Alan
>
>
>
> Yahoo! Groups Sponsor
ADVERTISEMENT
>
> 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
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make Money Online Auctions! Make $500.00 or We Will Give You Thirty Dollars for Trying!
http://us.click.yahoo.com/yMx78A/fNtFAA/46VHAA/GHeqlB/TM
---------------------------------------------------------------------~->
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
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|