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

[amibroker] Re: Need help on plot T3 buy and sell arrow signal



PureBytes Links

Trading Reference Links

wonet2001--
Good idea, pasting your code in.  I tried it and it wouldn't pass the 
AFL editor checker by itself.  Then I added, before your code, the 
following:
//=========== beginning of additional code ===========

s=0.636;
function T3(price,periods)
{
e1=EMA(price,periods);
e2=EMA(e1,Periods);
e3=EMA(e2,Periods);
e4=EMA(e3,Periods);
e5=EMA(e4,Periods);
e6=EMA(e5,Periods);
c1=-s*s*s;
c2=3*s*s+3*s*s*s;
c3=-6*s*s-3*s-3*s*s*s;
c4=1+3*s+s*s*s+3*s*s;
Ti3=c1*e6+c2*e5+c3*e4+c4*e3;
return Nz(Ti3);
}

//=========== end of additional code ========================

That worked for me just fine.  Check your T3 code.  Also, don't 
forget to use the AFL checker in AB's editor.

BTW, I don't see how you could get a buy and sell on the same bar 
using the cross function as you did.

BTW2, I like Graham's suggestion.  I've had problems in the past with 
not being able to see some arrows (hidden in a bar)(and it can also 
make debugging easier if sometime time you do have a buy and sell on 
the same bar).
> PlotShapes( shapeUpArrow*Buy, colorGreen, 0, L, -10 );
> PlotShapes( shapeDownArrow*Sell, colorRed, 0, H, -10 );
-- Keith

--- In amibroker@xxxxxxxxxxxxxxx, "Terry" <MagicTH@xxxx> wrote:
>
> Take Graham's advice.
> 
> The reason you get different symbols is you are ADDING Buy and Sell
> arrows from two conditions that are not opposites. In other words,
> you're getting Buy and Sell conditions AT THE SAME TIME so when you 
add
> and multiply the result is no longer an up OR down arrow.
> 
> shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
> 
> --
> Terry
> 
> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] 
On
> Behalf Of Graham
> Sent: Monday, December 05, 2005 20:06
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: Re: [amibroker] Need help on plot T3 buy and sell arrow 
signal
> 
> Make life easier for yourself and use separate lines for each
> condition, and include enough requirements in the statement to 
define
> what you want
> 
> PlotShapes( shapeUpArrow*Buy, colorGreen, 0, L, -10 );
> PlotShapes( shapeDownArrow*Sell, colorRed, 0, H, -10 );
> 
> 
> --
> 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 12/6/05, wonet2001 <wonet2001@xxxx> wrote:
> > This is part of T3 code which is supposed to plot
> > up arrow when T3(3> T3(5), and
> > down arrow when T(3) < T3(5),
> > it plots bunch of green circles on every position,
> > I didn't see anything wrong here,
> > please help me  , thanks
> >
> > CODE:
> >
> > Plot(T3(C,3),"T3(3)",colorGreen,1);
> > Plot(T3(C,5),"T3(5)",colorBlue,1);
> >
> > Buy=Cross(T3(C,3),T3(C,5));
> > Sell=Cross(T3(C,5),T3(C,3));
> > Buy=ExRem(Buy,Sell);
> > Sell=ExRem(Sell,Buy);
> >
> >
> > shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
> > PlotShapes( shape, IIf( Buy, colorGreen, colorRed ));
> >
> 
> 
> 
> 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
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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/

<*> 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/