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

Re: [amibroker] How to change daily vs. weekly indicator parameters ???



PureBytes Links

Trading Reference Links

Tom,

Here are two approaches to the problem, you should also think about
the case where you happen to click on another timefame i.e Monthly or
whatever.

Approach 1:

if (Interval() == inDaily )
        myMACD = MACD(12,26);
else if (Interval() == inWeekly )
        myMACD = MACD(6,13);
else
        myMACD = MACD();

Plot( myMACD,_DEFAULT_NAME(), colorBlueGrey, styleLine );


Approach 2:

myMACD = IIf( Interval() == inDaily, MACD( 12, 26 ), IIf( Interval() == inWeekly, MACD( 6, 13 ), MACD() ) );
Plot( myMACD,_DEFAULT_NAME(), colorBlueGrey, styleLine );



Regards,
William Peters
www.amitools.com



Monday, October 18, 2004, 7:28:04 PM, you wrote:



t> Is it possible to have my indicator parameters change automatically
t> as I change from daily to weekly views? For instance I use MACD
t> (12,26,9) for my daily charts but MACD(6,13,7) for my weekly view.
t> When viewing a daily chart with MACD(12,26,9) displayed, I would 
t> like the MACD to change to MACD(6,13,7) along with the price chart 
t> when I toggle to the weekly view. Is this possible?

t> Thanks,
t> Tom 





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

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/