Print Page | Close Window

Guppy’s MMA applied to RSC

Printed From: BullCharts Forum
Category: BullCharts
Forum Name: BullScript
Forum Discription: Technical discussion related specifically to the BullScript programming language.
URL: http://www.bullcharts.com.au/forum/forum_posts.asp?TID=219
Printed Date: 19 Apr 2025 at 9:49am
Software Version: Web Wiz Forums 9.69 - http://www.webwizforums.com


Topic: Guppy’s MMA applied to RSC
Posted By: Owen
Subject: Guppy’s MMA applied to RSC
Date Posted: 30 May 2005 at 2:40pm
I applied multiple moving averages to the RSC indicator, but it takes a long time to load my script. Is there a better way to write it?
My script:

MA(fml("Relative Strength Comparison"),3,e);
MA(fml("Relative Strength Comparison"),5,e);
MA(fml("Relative Strength Comparison"),8,e);
MA(fml("Relative Strength Comparison"),10,e);
MA(fml("Relative Strength Comparison"),12,e);
MA(fml("Relative Strength Comparison"),15,e);
[color=red]
MA(fml("Relative Strength Comparison"),30,e);
MA(fml("Relative Strength Comparison"),35,e);
MA(fml("Relative Strength Comparison"),40,e);
MA(fml("Relative Strength Comparison"),45,e);
MA(fml("Relative Strength Comparison"),50,e);
MA(fml("Relative Strength Comparison"),60,e)



Replies:
Posted By: Peter
Date Posted: 31 May 2005 at 9:59am
Calling one formula from another can sometimes be slow in BullScript. I've made a faster version by copying the main part of the RSC formula, then assigning the result to a temporary variable.

symb := inputsymbol("Compare to", "XAO");
{calc RSC manually}
tmp := C/LoadSymbol(symb,C);

MA(tmp,3,e);
MA(tmp,5,e);
MA(tmp,8,e);
MA(tmp,10,e);
MA(tmp,12,e);
MA(tmp,15,e);

[color=red]
MA(tmp,30,e);
MA(tmp,35,e);
MA(tmp,40,e);
MA(tmp,45,e);
MA(tmp,50,e);
MA(tmp,60,e)


Posted By: Owen
Date Posted: 31 May 2005 at 4:07pm
Wow Peter your script is lightening fast! I'll have to remember this trick. 



Print Page | Close Window

Bulletin Board Software by Web Wiz Forums® version 9.69 - http://www.webwizforums.com
Copyright ©2001-2010 Web Wiz - http://www.webwiz.co.uk