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

[amibroker] moving averages



PureBytes Links

Trading Reference Links

Hi! This shows 40 moving averages (20 for low and 20 for high). 

It takes lots of time to write theese though. Is there a simpler way 
to write a formula for this? Like using a loop if itīs possible!? 
Thanks!

MaxGraph = 40; 
Graph0= MA( Low, 1 ); 
Graph1= MA( Low, 2 ); 
Graph2= MA( Low, 3 ); 
Graph3= MA( Low, 4 ); 
Graph4= MA( Low, 5 ); 
Graph5= MA( Low, 6 ); 
Graph6= MA( Low, 7 ); 
Graph7= MA( Low, 8 ); 
Graph8= MA( Low, 9 ); 
Graph9= MA( Low, 10 ); 
Graph10= MA( Low, 11 ); 
Graph11= MA( Low, 12 ); 
Graph12= MA( Low, 13 ); 
Graph13= MA( Low, 14 ); 
Graph14= MA( Low, 15 ); 
Graph15= MA( Low, 16 ); 
Graph16= MA( Low, 17 ); 
Graph17= MA( Low, 18 ); 
Graph18= MA( Low, 19 ); 
Graph19= MA( Low, 20 ); 

Graph20= MA( High, 1 ); 
Graph21= MA( High, 2 ); 
Graph22= MA( High, 3 ); 
Graph23= MA( High, 4 ); 
Graph24= MA( High, 5 ); 
Graph25= MA( High, 6 ); 
Graph26= MA( High, 7 ); 
Graph27= MA( High, 8 ); 
Graph28= MA( High, 9 ); 
Graph29= MA( High, 10 ); 
Graph30= MA( High, 11 ); 
Graph31= MA( High, 12 ); 
Graph32= MA( High, 13 ); 
Graph33= MA( High, 14 ); 
Graph34= MA( High, 15 ); 
Graph35= MA( High, 16 ); 
Graph36= MA( High, 17 ); 
Graph37= MA( High, 18 ); 
Graph38= MA( High, 19 ); 
Graph39= MA( High, 20 ); 

Graph0Style = Graph1Style = Graph2Style = Graph4Style = Graph5Style = 
Graph6Style = Graph7Style = Graph8Style = Graph9Style = Graph10Style 
= Graph11Style = Graph12Style = Graph13Style = Graph14Style = 
Graph15Style = Graph16Style = Graph17Style = Graph18Style = 
Graph19Style = Graph20Style = Graph21Style = Graph22Style = 
Graph23Style = Graph24Style = Graph25Style = Graph26Style = 
Graph27Style = Graph28Style = Graph29Style = Graph30Style = 
Graph31Style = Graph32Style = Graph33Style = Graph34Style = 
Graph35Style = Graph36Style = Graph37Style = Graph38Style = 
Graph39Style = 1; 

Graph0Color = Graph1Color = Graph2Color = Graph4Color = Graph5Color = 
Graph6Color = Graph7Color = Graph8Color = Graph9Color = Graph10Color 
= Graph11Color = Graph12Color = Graph13Color = Graph14Color = 
Graph15Color = Graph16Color = Graph17Color = Graph18Color = 
Graph19Color = Graph20Color = Graph21Color = Graph22Color = 
Graph23Color = Graph24Color = Graph25Color = Graph26Color = 
Graph27Color = Graph28Color = Graph29Color = Graph30Color = 
Graph31Color = Graph32Color = Graph33Color = Graph34Color = 
Graph35Color = Graph36Color = Graph37Color = Graph38Color = 
Graph39Color = 5; 


------------------------ 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/