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

[amibroker] Parameter problem switching from daily to weekly



PureBytes Links

Trading Reference Links


I like to have my MA's and other indicators automatically adapt to 
whether I have a weekly chart or daily chart up so I include a block 
like this at the beginning of some of my AFL scripts:

periodicity=Interval(0);
n=15;
ps=50;
pl=144;
pmk=150;
ps0=65;
pi0=130;
pl0=260;
p5yr=1260;
pad1=10;
pad2=63;
pad3=20;

if (periodicity==432000) // Weekly
{
n=3;
ps=10;
pl=30;
ps0=13;
pi0=26;
pl0=52;
pmk=30;
p5yr=260;
pad1=2;
pad2=13;
pad3=4;
}

Plot( WMA(Close,ps), "WMA(10wk)", colorRed, styleLine);
Plot( WMA(Close,pl), "WMA(30wk)", colorBlue, styleThick);


This doesn't appear to update the periods anymore such as in the WMA 
plot command above. What has changed? Have I done something wrong?

- ace





------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.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/