PureBytes Links
Trading Reference Links
|
Bill
Am pasting code I use to change parameters between time frames. If I
have understood your purpose correctly, maybe the code I am pasting
below will help:
========================================================
prc=Close;
ST_MA=MA(PRC,10);
LT_MA=MA(PRC,70);
MACD_num=ST_MA-LT_MA;
MACD_DEN=LT_MA;
N_DMACD=MACD_num/MACD_DEN*100;
ST_WMA = MA(prc,5);
LT_WMA = MA(prc,35);
WMACD1=ST_WMA-LT_WMA;
WMACD2=LT_WMA;
N_WMACD=WMACD1/WMACD2*100;
ST_MMA = MA(prc,5);
LT_MMA = MA(prc,17);
mMACD1=ST_mMA-LT_mMA;
mMACD2=LT_mMA;
N_MMACD=MMACD1/MMACD2*100;
int_chk=Interval();
I_C_SWTCH_m=
IIf(INT_CHK==inDaily,n_dmacd,
IIf(INT_CHK==inWeekly,n_wmacd,
IIf(INT_CHK==inMonthly,n_Mmacd,
0))) ;
I_C_SWTCH_t=
IIf(INT_CHK==inDaily,EMA(i_c_swtch_m,9),
IIf(INT_CHK==inWeekly,EMA(i_c_swtch_m,8),
IIf(INT_CHK==inMonthly,EMA(i_c_swtch_m,8),
0))) ;
n_macd=i_c_swtch_m;
trgr=i_c_swtch_t;
M_Hist=N_MACD-TRGR;
Plot(N_MACD,"MACD_N",4);
Plot(TRGR,"M_TRGR",5);
=========================================================
HTH
R
On 9/15/05, wavemechanic <fimdot@xxxxxxxxx> wrote:
I often code indicator parameters for a chart as a
function of time frame. Works well but if I change the time frame (e.g.,
daily to weekly) with AB's toolbar settings, the parameters do not change unless
"Reset All" in the parameter dialog box is clicked. Needless to say, I
often forget to do this and end up looking at the wrong
display.
Is there anyway to duplicate the "Reset All" function
in AFL? It appears that changing the time frame from the toolbar does not
result in rereading the code, so perhaps this is an "impossible dream."
Any thoughts?
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
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
SPONSORED LINKS
YAHOO! GROUPS LINKS
|