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

[amibroker] Two Days after the Bullish Inflection [corrected]



PureBytes Links

Trading Reference Links




 
----- Original Message ----- 
From: <A 
title=tsokakis@xxxxxxxxx href="">Dimitris Tsokakis 

To: <A title=amibroker@xxxxxxxxxxxxxxx 
href="">amibroker@xxxxxxxxxxxxxxx 
Sent: Tuesday, September 30, 2003 1:55 PM
Subject: Two Days after the Bullish Inflection

The bullish movement begins with an ascending convex. 
[darkgreen area]
Before the end, the bulish pressure diminishes and the 
smoothing line becomes concave.[turquoise area]
The Inflection point gives the signal for the curvature 
change.
Exit two days later for a quick profit taking.
Since you know the exit day in advance, you may sell at 
Close, delay=0.
^NDX is the module array to apply the IIR2 smoothing and the 
concavity/convexity principle.
96/101 N100 stocks were profitable for this [bullish] 
year.
 
 


  
  
    Settings
  
     
  
    Initial Equity:
    10000
    
    Periodicity/Positions: 
    Daily/Long 
  
    Commissions:
    0.25 %
    
    Annual interest rate:
    0.00%
  
    Range:
    1/1/2003 00:00:00 - 30/9/2003
    
    Apply to:
    Filter
  
    Include Filter
     
    
    Exclude Filter
     
  
    Market
    -
    
    Market
    -
  
    Group
    Group 254
    
    Group
    -
  
    Sector
    -
    
    Sector
    -
  
    Industry
    -
    
    Industry
    -
  
    Watch list
    -
    
    Watch list
    -
  
    Index
    -
    
    Index
    -
  
    Favourite
    -
    
    Favourite
    -
  
    Margin requirement:
    100
    
    Futures mode:
    No
  
    Def. round lot size:
    0
    
    Def. Tick Size
    0
  
    Drawdowns based on:
    High/Low prices
    
     
     
  
    Long trades
  
    Buy price:
    Open
    
    Sell price: 
    Close
  
    Buy delay:
    1
    
    Sell delay: 
    0
  
    Short trades
  
    Short price:
    Open
    
    Cover price: 
    Open
  
    Short delay:
    1
    
    Cover delay: 
    1
  
    Stops
  
    Maximum loss:
    disabled
    
    Profit target: 
    disabled
  
    Value:
    50.00
    
    Value: 
    20.00
  
    Exit at stop?
    yes
    
    Exit at stop? 
    yes
  
     
  
    Trailing stop:
    disabled
    
      
     
  
    Value:
    5.00
    
      
     
  
    Exit at stop?
    yes
    
      
     


  
  
    FormulaZ1=LastValue(Cum(1)); 
function IIR2( input, f0, f1, f2 ) 
{ 
  result[ 0 ] = input[ 0 ];result[ 1 ] = input[ 1 ];  
  for( i = 2; i < BarCount; i++ ) 
  { 
    result[ i ] = f0 * input[ i ] + f1 * result[ i - 1 ] + f2 * result[ i - 2 ];  
  } 
  return result; 
} 
SetForeign("^NDX"); // Replace "^NDX" with your symbol for the N100 Index.
C1=C; 
k=0.45; 
RD=IIR2( C1, 0.3, 1.2+K, -0.5-K); 
y=RD; 
t=1; 
Convex=(y-Ref(y,-t))/t>=(y-Ref(y,-(t+1)))/(t+1); 
Concave=NOT(Convex); 
Ascending=y>=Ref(y,-1); 
Descending=NOT(ascending); 
Bullstart=Convex AND Ascending; 
Bullend=Concave AND ascending; 
Bearstart=Concave AND Descending; 
Bearend=Convex AND Descending; 
Color=IIf(Bullstart,colorDarkGreen,IIf(Bullend,colorTurquoise,IIf(Bearstart,colorDarkRed,colorPink))); 
Buy=BULLSTART AND Ref(BEAREND,-1); 
Sell=Ref(BULLEND AND Ref(BULLSTART,-1),-2); 
 



  
  
    Overall performance summary
  
     
  
    Total net profit:
    397055.54
     
    Total commissions paid:
    86943.91
  
    Return on account:
    39.31 % 
     
    Open position gain/loss
    0.00
  
    Buy&Hold profit:
    377566.31
     
    Bars (avg. days) in test:
    18887 (271)
  
    Buy&Hold % return:
    37.38%
     
    System to Buy&Hold index:
    5.16%
  
     
  
    Annual system % return: 
    56.29%
     
    Annual B&H % return:
    53.38%
  
     
  
    System drawdown:
    -3667.89
     
    B&H drawdown:
    -4183.06
  
    Max. system drawdown:
    -4803.97
     
    B&H max. drawdown:
    -10382.31
  
    Max. system % drawdown:
    -43.14%
     
    B&H max. % drawdown:
    -49.10%
  
    Max. trade drawdown:
    -4531.67
     
     
     
  
    Max. trade % drawdown:
    -33.83%
     
     
     
  
    Trade drawdown:
    -3544.00
     
     
     
  
     
  
    Total number of trades:
    1515
     
    Percent profitable:
    63.1%
  
    Number winning trades:
    956
     
    Number losing trades:
    559
  
    Profit of winners:
    668304.02
     
    Loss of losers:
    -271248.49
  
    Total # of bars in winners:
    5267
     
    Total # of bars in losers:
    2914
  
    Commissions paid in winners:
    55873.75
     
    Commissions paid in losers:
    31070.16
  
     
  
    Largest winning trade:
    4316.82
     
    Largest losing trade:
    -2928.74
  
    # of bars in largest winner:
    6
     
    # bars in largest loser:
    5
  
    Commission paid in largest winner:
    101.96
     
    Commission paid in largest loser:
    43.27
  
     
  
    Average winning trade:
    699.06
     
    Average losing trade:
    -485.24
  
    Avg. # of bars in winners:
    5.5
     
    Avg. # bars in losers:
    5.2
  
    Avg. commission paid in winner:
    58.45
     
    Avg. commission paid in loser:
    55.58
  
    Max consec. winners:
    12
     
    Max consec. losers:
    4
  
     
  
    Bars out of the market:
    10706
     
    Interest earned:
    0.00
  
     
  
    Exposure:
    43.3%
     
    Risk adjusted ann. return:
    129.96%
  
    Ratio avg win/avg loss:
    1.44
     
    Avg. trade (win & loss):
    262.08
  
    Profit factor:
    2.46
 
For IB use the 
Z1=LastValue(Cum(1));function IIR2( input, f0, f1, f2 
){  result[ 0 ] = input[ 0 ];result[ 1 ] = input[ 1 ];   
for( i = 2; i < BarCount; i++ )  {    result[ i ] 
= f0 * input[ i ] + f1 * result[ i - 1 ] + f2 * result[ i - 2 ];   
}  return 
result;}SetForeign("^NDX");C1=C;k=Optimize("k",0.45,0.1,0.5,0.01);RD=IIR2( 
C1, 0.3, 1.2+K, 
-0.5-K);y=RD;t=1;Convex=(y-Ref(y,-t))/t>=(y-Ref(y,-(t+1)))/(t+1);Concave=NOT(Convex);Ascending=y>=Ref(y,-1);Descending=NOT(ascending);Bullstart=Convex 
AND Ascending;Bullend=Concave AND ascending;Bearstart=Concave AND 
Descending;Bearend=Convex AND 
Descending;Color=IIf(Bullstart,colorDarkGreen,IIf(Bullend,colorTurquoise,IIf(Bearstart,colorDarkRed,colorPink)));Plot(y,"y",Color,8);Plot(C,"C",1,64);
PlotShapes((BULLEND AND 
Ref(BULLSTART,-1))*shapeHollowSmallDownTriangle,colorOrange);Buy=BULLSTART 
AND Ref(BEAREND,-1);Sell=Ref(BULLEND AND 
Ref(BULLSTART,-1),-2);PlotShapes(shapeDownArrow*Sell,colorRed);Graphxspace=2;
 
to see the basic ^NDX chart, the Inflection points [small 
orange triangle] and the SellTheMarket exits.
Dimitris Tsokakis
 
PS The factor k was selected near to the limit of its range 
[0.1 to 0.5] mainly for visual purposes.
The smoothing line looks now like a trendy sinusoidal and 
emphasises the periodicity of this year movement.
Another interesting observation : All the darkgreen areas 
[bullstart] came AFTER a pink area [bearend].
Consequently, when the bearish cycle begins [darkred 
bearstart] it is better to be patient until the pink
days appear [the new uptrend will not begin 
earlier...]






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.



Attachment:
Inflection.gif

Attachment: Description: "Description: GIF image"