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

[amibroker] Active Trader v TASC, anyone? [was: TASC CD]



PureBytes Links

Trading Reference Links

Arrgh.... been working on this all day and not getting anywhere.  
Can't seem to put in the 2nd function call without getting a "too 
many arguments" error message for reasons I can't understand.  
Anyone have any idea?

Here's the code:

//1. Define variables & functions
ticker=Name();
GARBAGE=1;
Days=0;
range=0;
Oversold=30;
Overbought=70;
Plot(C,"close ",colorWhite,styleBar);

function PlotMA(Days,Color)
{
result=MA(C,Days);
Plot(result,"MA ",color,styleLine);

return result;
};

function makewhip(range,bottom,top)
{
result2=RSI(C,range);
result3=result2/5;
Plot(result3,"RSI/5 Value ",colorRed,styleLine|styleOwnScale,0,100);
Plot(top,"Overbought sell trigger ",colorRed,styleLine);
Plot(bottom,"Oversold buy trigger ",colorRed,styleLine);
return result3;
};

//2. Select correct analysis
if (ticker=="AXP")
{Days=4;Color=colorBlue;PlotMA(Days,Color);}
else {GARBAGE==1;Days=1000;}
if (ticker=="GM")
{Days=34;Color=colorBlue;PlotMA(Days,Color);}
else {GARBAGE==1;}
if (ticker=="JPM")
{Days=5;Color=colorBlue;PlotMA(Days,Color);}
else {GARBAGE==1;}

if (ticker=="IGT")
{
range=4;
Overbought=87;
Oversold=44;
makewhip(range,Oversold,Overbought);
}
else {GARBAGE=1;}


Plot(Days,"DAYS",colorRed,styleLine|styleOwnScale);
Plot(Overbought,"overbought",colorBlue,styleLine|styleOwnScale);






------------------------ Yahoo! Groups Sponsor ---------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/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 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
     amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/