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

[amibroker] Re: EMA/breakout signals composite indicator



PureBytes Links

Trading Reference Links

Bob, Juan is not here - hope you don't mind if I reply instead... ;)

> You are trying to write a opus; did you proceed incrementally and 
get pieces to work?

It's actually very simple code.  Elegant if I may say so.  There is no 
redundant code there anywhere.

The purpose of this EMA:
Plot a normal EMA with 200 periods on a chart, and you'll see no plot 
for the first 200 periods.  My code takes care of that.


> Perhaps a comment or two would help, as would meaningful variable 
names.

Will do that from now on.  Used to coding in MetaStock, where coding 
space is minimal (2K).

> P = IIf(x==1,O,IIf(x==2,H,IIf(x==3,L,IIf(x==4,V,C)))); //  don't 
reuse x!!!

Why - does x get worn out?  :)

> I haven't a clue what you intend by prds = IIf(Cum(x!=-101)<pds,
Cum(x!=-101),pds);
> the sum of any of the prices arrays will never be negative [and you 
reused prds again!!! ].

The reason for this is that I intend to use this EMA on oscillators 
with negative values as well, that is, as soon as I find the "P" 
variable equivalent of MetaStock.


So, any thoughts on why this doesn't work:

IIf(display=2,
 Plot(signals,"EMA signals",colorRed,styleLine),
 Plot(EMA1,"EMA",colorRed,styleLine));

// If parameter display choisen = 2, plot EMA crossover signals, 
otherwise plot EMA

Why is AB plotting both outputs?


*Jose*



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/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/