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

Re: [amibroker] exiting flat positions



PureBytes Links

Trading Reference Links




Gary,
 
Seems like you need another bracket in the equation 
... where should it be?
 
Effiency Index (EI) = (C - ref(C,-x)/ATR(x)) 
 
or
 
Effiency Index (EI) = (C - ref(C,-x))/ATR(x)
 
 
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  Gary 
  A. Serkhoshian 
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Friday, December 12, 2003 2:24 
  PM
  Subject: Re: [amibroker] exiting flat 
  positions
  
  Hi Dave,
   
  I like your code, and your idea.  In terms of an alternative, Al 
  posted Tharpe's Efficiency Index which addresses chop.  Here's his code 
  and explaination. Regards,
  Gary
   
  Effiency Index (EI) = (C - ref(C,-x)/ATR(x)
  
  An efficient stock is a stock whose price movements are high 
  relative to its volatility changes (i.e., the price change is high but the 
  volatility change is minor). So, if a stock increases by 3 points while its 
  volatility only increases a little, that's good because it gives you greater 
  profitability at a given volatility.
  
  I think the way you would use it would be as a boolean Buy (or 
  Short) qualifier. In other words, something like this:
  Buy = <your normal buy rules> AND EI > y; //where y 
  is an optimizable variable.Dave Merrill 
  <dmerrill@xxxxxxx> wrote:
  <BLOCKQUOTE class=replbq 
  >Obviously, 
    losses are a problem. But so are positions that hang in thereforever 
    taking up available cash but going nowhere, without hitting 
    profittargets or stops.How would you code that, assuming you're 
    dealing with a system that tries todump losers but let winners run as 
    long as they're advancing.I tried starting from a modest stoploss, 
    with the stop percentage advancingevery day until it becomes negative, 
    enforcing the requirement to make aprofit or get off the bus. I'm not 
    certain, but I think it's working, justnot very profitable in the 
    context I tried it:.Here's the 
    code:----------------bars_since_buy = NZ(BarsSince(buy), 
    BarCount);bars_since_short = NZ(BarsSince(short), 
    BarCount);bars_since_entry = IIf(bars_since_buy < bars_since_short, 
    bars_since_buy,bars_since_short);stoploss_rise = Optimize("stoploss 
    rise", .5, .1, 1, .1);stoploss = 13 - (stoploss_rise * 
    bars_since_entry);ApplyStop(stopTypeLoss, stopModePercent, stoploss, 
    false, true, 0);----------------Anyone see any problems with the 
    implementation? Any other ideas foravoiding sitting in stagnant 
    positions?DaveSend 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! Te! rms of Service. 
    
  
  
  Do you Yahoo!?<A 
  href="">New 
  Yahoo! Photos - easier uploading and sharing 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.