|
Don't understand. It works for me. Also,
you don't need the IIF("color"). Here is your code without the
IIF("color") and a screen shot:
tweezerTop=abs(H-Ref(H,-1))<=H*0.0025; tweezerBottom=abs(L-Ref(L,-1))<=L*0.0025; z=tweezerTop; z1=tweezerBottom; Plot(C, "", colorPaleGreen, styleBar); PlotShapes (shapeCircle * z, colorRed, 0, High, 30 ); PlotShapes (shapeCircle * z1 , colorYellow, 0, Low, -30 ); Bill
----- Original Message -----
From: "nebt1" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, September 17, 2006 2:35
AM
Subject: [amibroker] Re: Help needed on simple Tweezer
code:
> Thanks for your response. I have changed the code as you advised but > still have the same problem: > each and every candle has circle on top and bottom. Need only one > circle and has to be on Tweezer (top or bottom) only. Here is what I > got so far: > Please help to fix this code. > > tweezerTop=abs(H-Ref(H,-1))<=H*0.0025; > tweezerBottom=abs(L-Ref(L,-1))<=L*0.0025; > > z=tweezerTop; > z1=tweezerBottom; > > PlotShapes ((shapeCircle * z), IIf(z, colorRed, colorCustom9), 0, > High, 30 ); > PlotShapes ((shapeCircle * z1) , IIf(z1, colorLime, colorCustom9), 0, > Low, -30 ); > > Please help to fix this code. > Tia, Ben > > --- In [email protected], "wavemechanic" <[EMAIL PROTECTED]> wrote: >> >> You have to "turn on" and "turn off" shapecircle when z or z1 are > true. You can do this by replacing shapecircle by (shapecircle * z) > and (shapecircle * z1). >> >> Bill >> >> >> ----- Original Message ----- >> From: "nebt1" <[EMAIL PROTECTED]> >> To: <[email protected]> >> Sent: Saturday, September 16, 2006 9:08 PM >> Subject: [amibroker] Re: Help needed on simple Tweezer code: >> >> >> > Hi Graham, >> > >> > Thanks for your response. >> > Here is what I have done to try to correct the problem, but all I > get >> > is two circles on every candle, red on top and green on bottom, > which >> > is incorrect. Tweezer must have red circle above one candle only > for >> > each double top in price and green circle below one candle only > for >> > each double bottom in price. >> > Would appreciate if someone can help with this basic code error. >> > >> > tweezerTop=abs(H-Ref(H,-1))<=H*0.0025; >> > tweezerBottom=abs(L-Ref(L,-1))<=L*0.0025; >> > >> > z=tweezerTop; >> > z1=tweezerBottom; >> > >> > PlotShapes (shapeCircle, IIf(z, colorRed, colorCustom9), 0, High, >> > 30 ); >> > PlotShapes (shapeCircle, IIf(z1, colorLime, colorCustom9), 0, > Low, - >> > 30 ); >> > >> > Tia, Ben >> > --- In [email protected], Graham <kavemanperth@> wrote: >> >> >> >> It is the plotshapes function >> >> >> >> PlotShapes (shapeCircle, IIf(z, colorRed, colorcustom9), 0, > High, >> > 30 ); >> >> >> >> >> >> -- >> >> Cheers >> >> Graham >> >> AB-Write >< Professional AFL Writing Service >> >> Yes, I write AFL code to your requirements >> >> http://e-wire.net.au/~eb_kavan/ab_write.htm >> >> >> >> >> >> On 17/09/06, nebt1 <nebt1@> wrote: >> >> > >> >> > >> >> > Hi, >> >> > I found code for Tweezer tops/bottoms in AFL library but having >> >> > problems to implement it. >> >> > >> >> > tweezerTop=abs(H-Ref(H,-1))<=H*0.0025; >> >> > tweezerBottom=abs(L-Ref(L,-1))<=L*0.0025; >> >> > >> >> > Now I am trying to implement it on Price bars by draging into >> > price >> >> > method: >> >> > >> >> > //TWEEZER for price bars >> >> > /*Tweezer Top*/ >> >> > tweezerTop=abs(H-Ref(H,-1))<=H*0.0025; >> >> > >> >> > /*Tweezer Bottom*/ >> >> > tweezerBottom=abs(L-Ref(L,-1))<=L*0.0025; >> >> > >> >> > z=tweezerTop; >> >> > z1=tweezerBottom; >> >> > >> >> > PlotShapes (IIf(z, colorRed, colorcustom9) ,shapeCircle, 0, > High, >> >> > 30 ); >> >> > PlotShapes (IIf(z1, colorLime, colorcustom9) ,shapeCircle, 0, >> > Low, - >> >> > 30 ); >> >> > >> >> > That gave me syntax error. >> >> > >> >> > I also need to implement Tweezer into Indicator, so this is > what I >> >> > have done: >> >> > >> >> > //TWEEZER on indicator >> >> > /*Tweezer Top*/ >> >> > tweezerTop=abs(H-Ref(H,-1))<=H*0.0025; >> >> > >> >> > /*Tweezer Bottom*/ >> >> > tweezerBottom=abs(L-Ref(L,-1))<=L*0.0025; >> >> > >> >> > z=tweezerTop; >> >> > z1=tweezerBottom; >> >> > >> >> > PlotShapes((IIf(z,colorRed,IIf >> >> > > (z1,colorLime,colorCustom9)),shapeSmallCircle,shapeNone),0,0,100); >> >> > >> >> > That also gave me syntax error. >> >> > >> >> > Please help to implement Tweezer code on Price candles and on >> >> > separate Indicator. >> >> > Tia, Ben >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > 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 >> > >> > >> > Yahoo! Groups Links >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > -- >> > No virus found in this incoming message. >> > Checked by AVG Free Edition. >> > Version: 7.1.405 / Virus Database: 268.12.4/449 - Release Date: > 9/15/2006 >> > >> > >> > > > > > > > > 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 > > <*> To visit your group on the web, go to: > http://groups.yahoo.com/group/amibroker/ > > <*> Your email settings: > Individual Email | Traditional > > <*> To change settings online go to: > http://groups.yahoo.com/group/amibroker/join > (Yahoo! ID required) > > <*> To change settings via email: > mailto:[EMAIL PROTECTED] > mailto:[EMAIL PROTECTED] > > <*> To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > > <*> Your use of Yahoo! Groups is subject to: > http://docs.yahoo.com/info/terms/ > > > > > > > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.405 / Virus Database: 268.12.4/449 - Release Date: 9/15/2006 > > __._,_.___ 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
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 __,_._,___ |
- Re: [amibroker] Re: Help needed on simple Tweezer code: wavemechanic

