Please help in making a alf

crown

Well-Known Member
#1
Dear big brothers

please help in making a afl on following

This is working good in daily charts. But I want it for weekly charts so that it can give signal on weekly charts. I tried but not successful.


CCI(14) should be increasing for two weeks
cci(14) > ref(cci(14, -1) and ref(cci(14, -1) > ref(cci(14, -2)

CCI(6) should be greater than previous cci(6)
cci(6) > ref(cci(6, -1)

close > ref (high, -1)
 
#2
crown
your formula also works on weekly charts,
just some syntax errors
please see the following code

SetChartOptions(2,chartShowDates);
GraphXSpace=5;
Plot(C,"",1,64);
cond1=CCI(14) > Ref(CCI(14), -1) AND Ref(CCI(14), -1) > Ref(CCI(14), -2);
cond2=CCI(6) > Ref(CCI(6), -1);
cond3=Close > Ref (High, -1) ;
Buy=Cond1 AND Cond2 AND Cond3;
PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorBlue,0,L);

vidyasagar

please remove space after colorBl in the last line
 

crown

Well-Known Member
#3
crown
your formula also works on weekly charts,
just some syntax errors
please see the following code

SetChartOptions(2,chartShowDates);
GraphXSpace=5;
Plot(C,"",1,64);
cond1=CCI(14) > Ref(CCI(14), -1) AND Ref(CCI(14), -1) > Ref(CCI(14), -2);
cond2=CCI(6) > Ref(CCI(6), -1);
cond3=Close > Ref (High, -1) ;
Buy=Cond1 AND Cond2 AND Cond3;
PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorBlue,0,L);

vidyasagar

please remove space after colorBl in the last line
namaste vidyasagar bhai

Thanks a ton bro for helping
:clap:
 

crown

Well-Known Member
#4
vidya bhai

there seem to be some mis-communication on my part.
This is not what I am looking for?

Actually, I need a filter to sort out the scripts on the given parameters.

Please help big brothers.
 

Similar threads