delays = Param("Trade Delays", 1, 0, 2, 1);
GraphXSpace=5;
SetTradeDelays (delays,delays,delays,delays);
Budl = Status("buydelay");
Buy = Cross( MA(C,10), MA(C,100) );
SellA = Cross( MA(C,100), MA(C,10) );
PlotShapes(shapeDownArrow*SellA,colorYellow,0,H,-20);
BuyPrice = SellPrice = O;
Limit = ValueWhen(Ref(Buy,-budl),BuyPrice*1.05); // <<5% over entry price
Trail = HighestSince(Ref(Buy,-budl),H)*0.95; // << 5% trail
AllowTrail = Flip(Cross(H,Limit),Buy);
SellB = Cross(Trail,L) AND AllowTrail;
PlotShapes(shapeHollowDownArrow*SellB,colorYellow,0,H,-20);
Sell=Sella OR Sellb;
Equity(1,0);
PlotShapes(shapeDownArrow*Sell,colorRed,0,H,-10);
intrade = Flip(Buy,Sell);
Plot( C, "",IIf(intrade,colorRose, colorGrey50), styleBar );
PlotShapes( shapeUpArrow*Buy, colorBrightGreen, 0, L, -20 );
Plot( Limit, "Buyprice+%",colorYellow,styleLine|styleNoRescale );
Plot( Trail, "Long Trail", IIf(allowtrail,colorRed,colorBlue), styleLine|styleNoRescale );
--
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 07/09/06, optiekoersen <
[EMAIL PROTECTED]> wrote:
Hello,
Does anybody know how I have to implement a trailingstop which starts
at a certain profit level? Say when de price is 10% above my
buyingprice the trailingstop needs to start working.
I really don't know how to fix this, so I will be very thankful for
every command that will help me further.
Greets Ronald
------------------------ Yahoo! Groups Sponsor --------------------~-->
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/7EuRwD/fOaOAA/yQLSAA/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/
<*> 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/
__._,_.___
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
| Software support | Small business finance | Business finance online |
| Business finance training | Business finance course |
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
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
__,_._,___
