Thanks, this will help me a lot to finetune the system! Greets Ronald
--- In [email protected], Graham <[EMAIL PROTECTED]> wrote: > > Here is what I call the straightforward solution using basic AB functions > from my information library, loops can be more positive especially with > entry signals that can occur during a trade. This solution is not perfect, > and is more long-winded than really necessary, but can give you guidance for > where to begin > > 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 > > > > > > > > > > > > > > > > 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 <*> 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/
