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

RE: [amibroker] crash when concatenating SectorID for ATC



PureBytes Links

Trading Reference Links

Hi Johan,

I used Notepad Light to do a string searches of my AFL files on disk and I
found over 100 with '83' and/or '17' in them...and several with the string
StoRSI in the filename.

I provide one of them below, I think from Sid Kaiser.

HTH
-john

<clip>
/********** System description and revision data **********/
/*   StoRSI_04   StoRSI is used as a counter trend entry Signal,  it buys
AND sells early,
anticipating a reversal.  Added a moving average as a trend Filter to tame
the frantic trading.
29 Dec 2003 added basic liquidity filter, an overall framework and included
some housekeeping items for AB

This system exhibits the same poor behavior as any other system with similar
logic. Systems that depend on fixed trigger levels for entries and exits may
miss a trading signal because many times the fixed trigger level is not
crossed.  For entries this results in lost opportunity.  However, for exits
it can result in serious losses as the system misses its exit and large
drawdowns occur.  Different logic is required for exits to absolutely
guarantee a signal is always generated so exits are always executed.  This
is required here.  The exit logic must change.  Examing charts with signals
shown for the biggest losers points out this problem very quickly.  This is
a step that should be performed without fail for any system.  The backtest
results alone are not sufficient.  Visual inspection of the charts is also
required to see if the trades "make sense".

Try it on NDX 100 basket */

/********** AmiBroker Settings for Backtesting **********/
SetFormulaName("CSD_StoRSI_04_xxxx");

SetTradeDelays(1,1,1,1);
SetOption("InitialEquity", 100000);
SetOption("AllowPositionShrinking",True);
SetOption("MinShares", 100);
RoundLotSize = 1;

/********** Select the watchlists to be used **********/

/********** Liquidity, Turnover, other preliminary filtering **********/
Liq = Close * EMA(Volume, 5) > 1e^6;

/********** Activate Portfolio Testing **********/
SetOption("MaxOpenPositions", 5);

/********** Included Files and Functions **********/
#include <StoRSI.afl>;

/********** General Market Timing Indicators **********/

/********** Position sizing **********/
PositionSize = -25;
//  Van Tharp sizing ?????


/********** System Trading Logic **********/

// QQQ 15/13/2  NDX100 17/21/6
RSIPer= 8;//Optimize("RSIPer", 17, 3, 21, 1);
StoPer= 19;//Optimize("StoPer", 21, 5, 27, 1);
Smooth= 3;//Optimize("Smooth", 6, 1, 8, 1);

SR = StoRSI(Close,RSIPer,StoPer,Smooth);

blvl = 14;//Optimize("blvl",17,11,43,1);
slvl = 96;//Optimize("slvl",83,75,98,1);
TFper = 43;//Optimize("TFper",43,5,183,1);

TF = ROC(EMA(Close, TFper),1);

// Change the exit logic to something that works!
Buy = Liq AND TF >= 0 AND Cross(blvl,SR);
//Buy = IIf(SR<40,Cross(SR, EMA(SR,3)),0);

Sell= Cross(SR,slvl);

Short = Liq AND TF < 0 AND Cross(SR,SLVL);

Cover = Cross(blvl,SR);

//sp = 26.5;//Optimize("sp",9.5,1,27,0.5);
//ApplyStop(stopTypeLoss,stopModePercent,sp,0,False);

/********** Position Scoring Logic **********/
// !!!!!!!  add positionscore logic

----- Original Message ----- 
From: "Johan" <epostens@xxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Friday, July 02, 2004 1:18 AM
Subject: [amibroker] Stochrsi


A while ago i found an indicator and then lost it. Thin green line
with sell at 83 and buy at 17 i think. Canīt find it here and i am
not sure if itīs name was Stochrsi. Do you know?

Thanks!




Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/