Here are a few methods to show different values for variables per symbol

DmiOptimalLength = 10; MaOptimalLength = 15; // defaults
if(Name()=="GBPUSD") {DmiOptimalLength = 6; MaOptimalLength = 10;}
if(Name()=="EURUSD") {DmiOptimalLength = 8; MaOptimalLength = 20;}

IF can be used because the condition variable is not an array

You cna also use
DmiOptimalLength = iif(Name()=="GBPUSD",6, if(Name()=="EURUSD", 8, 10));
MaOptimalLength = iif(Name()=="GBPUSD",8, if(Name()=="EURUSD", 20, 15));

or this but all symbols need to be listed
DmiOptimalLength = (Name()=="GBPUSD")*6 + (Name()=="EURUSD")*8;
MaOptimalLength = (Name()=="GBPUSD")*8 + (Name()=="EURUSD")*20;


--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://www.aflwriting.com


On 03/03/07, Keith McCombs <[EMAIL PROTECTED]> wrote:

 Alex --
Why not just:
GBPUSD_DMI = Optimize("GBPUSD_DMI", 6, 1, 100, 1);
GBPUSD_MA = Optimize("GBPUSD_MA", 10, 1, 100, 1);
EURUSD_DMI = Optimize("EURUSD_DMI", 8, 1, 100, 1);
EURUSD_MA = Optimize("EURUSD_MA", 20, 1, 100, 1);

Of course, you might not want to do this if your trying to optimize the
entire NYSE ;-)
-- Keith

dralexchambers wrote:

 Hi,

Is it possible to optimise settings for several symbols in one go
like this:

GBPUSD: DMI optimal length = 6, MA optimal length = 10
EURUSD: DMI optimal length = 8, MA optimal length = 20

etc...

Thanks - alex

Reply via email to