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

[amibroker] some functional help needed in modifying this afl [1 Attachment]


  • Date: Thu, 19 Nov 2009 18:21:22 +0530
  • From: Deepak Patade <iamdeepakpatade@xxxxxxxxx>
  • Subject: [amibroker] some functional help needed in modifying this afl [1 Attachment]

PureBytes Links

Trading Reference Links

[Attachment(s) from Deepak Patade included below]

i have a afl triangular , i slightly modified it to get signals
i want signal every time a green dot appears for two consecutive times and if after one green dot a red appers the previous is green is to be nullified and it has to wait again for two green dots in a sequence.( the other way for red dots also)
BUT
afl gives redundant signal
see file attached
what is to be incorporated to filter this ,
I know somethingis missing tried hard
This is a traingular moving average ( afl library)  slightly modified by me
 
Odd=13;//enter Odd numbers only
CoefOdd=round(Odd/2);
Even=12;//enter Even numbers only
Coefeven=Even/2;
Coefeven2=Coefeven+1;
CongestionPercent=2.8;/*Set % above/below Moving average for congestion / sideways market*/
TriangularOdd=MA(MA(C,CoefOdd),CoefOdd);
TriangularEven=MA(MA(C,Coefeven),Coefeven2);
finalMov_avg=IIf(Odd > even,triangularOdd,TriangularEven);
colordots = IIf(finalMov_avg < L,colorBrightGreen,IIf(finalMov_avg > H,colorRed,colorWhite));
Buy = Cross(C,finalMov_avg); Buy = Ref(Buy,-1); BuyPrice = O;
Sell = Cross(finalMov_avg,C); Sell = Ref(Sell,-1); SellPrice = O;
SetBarsRequired(-2,-2);
SetChartOptions(0, chartShowDates);
Plot(C,"\nClose",colorWhite,64);
Plot(finalMov_avg,"\finalMov_avg",colordots,styleDots|styleNoLine);
Color=colorBrightGreen;//select Moving average line color
tickercolor=colorBlack;//select price color
Plot(finalMov_avg,"",IIf(C < finalmov_avg,colorRed,Color),styleLine|styleThick);
Plot(C,"",tickercolor,styleCandle);
Short = Sell;
Cover = Buy;
Buy = ExRem(Buy,Sell);
Sell= ExRem(Sell,Buy);
Short=ExRem(Short,Cover);
Cover=ExRem(Cover,Short);
 
Please help out

Attachment(s) from Deepak Patade

1 of 1 Photo(s)


__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___