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

Re: [amibroker] Different stops (long and short)



PureBytes Links

Trading Reference Links




Try:
 
Chuck:
 
Try:
 
LongPos=flip(buy,sell);
ShortPos=flip(short,cover);
<FONT face=Arial 
size=2>applystop(stopTypeLoss,stopModePercent,iif(LongPos,5,50),False);
 
This hasn't been tested.
 
Ted

<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  <A title=chuck_rademacher@xxxxxxxxxx 
  href="">Chuck Rademacher 
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Wednesday, March 26, 2003 5:43 
  PM
  Subject: [amibroker] Different stops 
  (long and short)
  
  I would 
  like to have either a different stop method or percent for long vs. short 
  trades.
  <FONT face=Arial 
  color=#0000ff> 
  I thought 
  that something like this would work:
  <FONT face=Arial 
  color=#0000ff> 
  
  LossPercent=<FONT 
  color=#0000ff>IIf(<FONT 
  color=#0000ff>BarsSince(Buy)<<FONT 
  color=#0000ff>BarsSince(Sell),5,<FONT 
  color=#ff00ff>50);
  ApplyStop<FONT 
  face=Arial>(stopTypeLoss,stopModePercent,lossPercent,False);
   
  But, it didn't do what I 
  expected.
  Actually, a different stop 
  method presents me with an even bigger problem.
  Any 
  thoughts?Send 
  BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 







Yahoo! Groups Sponsor


  ADVERTISEMENT









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 the Yahoo! Terms of Service.