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

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



PureBytes Links

Trading Reference Links


William,

Thanks, That worked nicely....and I did add another "else...if" to 
account for the monthly interval as you pointed out.
The one problem I had was with your _DEFAULT_NAME() function. Can 
you share with me how that works?

Thanks again and best regards,
Tom

--- In amibroker@xxxxxxxxxxxxxxx, William Peters 
<williampeters@xxxx> wrote:
> 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 --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/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/