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

RE: [amibroker] Triple Moving Average formula question ??



PureBytes Links

Trading Reference Links




<SPAN 
class=256072616-24112003>Jmb,
You 
have taken the first step in writing it out in English. Now just take it to next 
step by coding your thoughts as cond1 cond2 etc....
<SPAN 
class=256072616-24112003> 
<SPAN 
class=256072616-24112003>cond1=ma(c,20)>ma(c,35) AND 
c>ma(c,50);
<SPAN 
class=256072616-24112003> 
from 
there you should be able to color the plot using IIf.....
<SPAN 
class=256072616-24112003> 
<SPAN 
class=256072616-24112003>plot(X,"Sun",iif(cond1,coloryellow,colorblack),stylearea);
<SPAN 
class=256072616-24112003> 
X= 
your value ,what ever that may be ...try close as an example. 
<SPAN 
class=256072616-24112003>Since cond1 returns either a true or false (1 or 0) you 
will need to plot a value other than cond1 but cond1 can be used to trigger the 
color of your plot..
 
Regards, 
Jayson 
<FONT face=Tahoma 
size=2>-----Original Message-----From: jmbruegge 
[mailto:jmbruegge@xxxxxxxxx]Sent: Monday, November 24, 2003 11:23 
AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Triple 
Moving Average formula question ??I am trying to write 
a indicator formula similiar to the "Sun and Cloud" formula appearance in 
the AFL formulas area with the following characteristics and am stuck, any 
ideas ???1 - If the 20 day (or week) MA breaks above the 35 day (or 
week) MA AND the price is above the 50 MA  = yellow fill-in (like on 
sun and cloud indicator) or yellow up arrow to be generated.2 - If 
the 20 day (or week) EMA breaks above the 50 day (or week) EMA = green 
fill-in (like sun and cloud indicator) or green up arrow AND the price is 
above the 50 day (or week) EMA.  (this is a confirmed buy 
signal)3 - If the 20 day (or week) EMA breaks BELOW the 35 day (or week) 
EMA and the price is below the 50 MA = yellow fill-in or yellow down 
arrow.4 - If the 20 day (or week) EMA breaks below the 50 day (or 
week) EMA and price is below the 50 MA = red fill-in or red down arrow. 
(confirmed sell signal)Any help would be much appreciated 
!!cheers -jmbSend 
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
suggest@xxxxxxxxxxxxx-----------------------------------------Post 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service. 







Yahoo! Groups Sponsor












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.