PureBytes Links
Trading Reference Links
|
Hello,
the rem.dll can do something like this, for example there is an
option when a profit is reached a trailingstop is initialized...
but I must write an update to the help file and I am a little lazy.
stephane
> Yes Tomasz. I had not thought of the loop features. Sorry. I would
just say
> that perhaps it would be a bit more "user friendly" to have this
ability
> coded right in the "ApplyStop" function ;-). Coding multiple types
of stops
> with conditions through loops is not very easy for a non programmer.
>
> Well, let's say that it will help me me improve my programing
skills :-).
>
> Best regards, Jérôme ULRICH
> -----Message d'origine-----
> De : Tomasz Janeczko [mailto:amibroker@x...]
> Envoyé : jeudi 23 octobre 2003 11:15
> A : amibroker@xxxxxxxxxxxxxxx
> Objet : Re: Conditionnal stops (RE: [amibroker] trailing stop
question
> from new user)
>
>
> Hello,
>
> It is perfectly possible but you need to write a loop for that as
shown in
> the users guide and my other response.
>
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message -----
> From: Silvarius
> To: amibroker@xxxxxxxxxxxxxxx
> Sent: Thursday, October 23, 2003 11:02 AM
> Subject: Conditionnal stops (RE: [amibroker] trailing stop
question from
> new user)
>
>
> Hello,
>
> I don't think it is possible right now. The only way I can
imagine would
> be through the Equity(1) function, but even that doesn't work
properly. In
> fact, the Equity(1) function writes down the stops to
the "sell/cover"
> variables, but doing so, new buy/short signals can be generated
after the
> first stop that can modify the following positions. You should
iterate the
> whole formula the same number of times as there are stop signals. I
think it
> would be possible through a "WHILE" loop, but it doesn't seem a
very sound
> process.
>
> A better solution would be to have a "condition" parameter in
the
> "ApplyStop" function, related to the state (in terms of profit and
number of
> bars since opening) of the current opened position. Something like :
>
> "ApplyStop(type,mode,amount,condition,ExitAtStop,Volatile)"
>
> A concrete example :
>
> "ApplyStop(StopTypeLoss, StopModePoint,5,"Profit > 10 and Nbars
>
> 5",true,true);"
>
> "Profit" and "Nbars" could be something like "internal
variables" and
> you could imagine to be able to decide if "Profit" is using a
percent or
> mode value.
>
> With theses conditionnal stops, you can imagine any combination
of stops
> according to the way your position is evolving. For
example : "after 10
> days, exit the position if it shows a loss, otherwise, use a
trailing stop".
>
> Would you find this feature interresting ? Tomasz, would it be a
> nightmare to code ?
>
> Best regards, Jérôme ULRICH
> -----Message d'origine-----
> De : jwilsonp2a [mailto:j1wilson@x...]
> Envoyé : jeudi 23 octobre 2003 09:05
> À : amibroker@xxxxxxxxxxxxxxx
> Objet : [amibroker] trailing stop question from new user
>
>
>
> Hi,
>
> I am trying to implement a two tiered stop loss, one part
being a
> trailing stop, the other a fixed stop. I want a 3% trailing
stop if
> I am at least 10% profitable, else I want a fixed stop loss
price.
>
> I thought I had it, but can't quite figure out how to utilize
a
> variable in the ApplyStop(2,x,3,true,false) command. It is
the "x" I
> just showed that needs to be a 1 to enable, or a 0 to disable.
>
> Here is a portion of my code:
>
> ==================================================
> .
> .
> .
> BuyPrice = Max(BuySTOP,Low);
> SellPrice = Min(SellSTOP,High);
>
> profit_ten_percent = (((High - BuyPrice)/BuyPrice) >= 0.10);
> enable_stop = IIf(profit_ten_percent,1,0);
>
> ApplyStop(2,enable_stop,3,True,False);
> Sell = Cross(SellPrice,Low);
> ==================================================
>
> It's the "enable_stop" variable that fouls this up. Is this
strategy
> even possible? I would greatly appreciate any help on this.
>
> Thank you, Jim
>
>
>
>
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to:
amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
>
>
>
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
>
>
> Yahoo! Groups Sponsor
> ADVERTISEMENT
> [AD]
>
>
>
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|