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

[amibroker] Nag Nag Nag exploration



PureBytes Links

Trading Reference Links


I thought the group might find this exploration useful. 
Sid
***************

/*  Nag Nag
Nag Exploration for exits.

This is designed to be run on the current holdings watch list every
day.  If you have no trading system or your trading system is NOT as
reliable as you like, this exploration will keep reminding you that the
stock is going down.  IOW, it says, hey dumb A__, you're losing
money here!

The indicators cover increasingly longer time frames from very short to
last resort.

Select use filter for desired watch list and select n last days, n= 1,
then Explore.
I follow up with a chart set up with the five indicators on it for visual
confirmation.

Works well with stocks or mutual funds.

Sid Kaiser, V2.0, 10 Feb 2003  */


// ST CMO
per =
5;//Optimize("per",5,2,7,1);
CMO =
scCMO(C,per); 
//or you
can write out your own function for CMO
SLevel =
45;//Optimize("SLevel",20,-30,90,2);
BLevel =
-44;//Optimize("BLevel",-44,-90,20,2);
CMS = CMO <
Slevel;
CMb = CMO > Blevel;

//
StochRSI
MAper =
8;//Optimize("MAper",5,3,34,1);
Slvl =
65;//Optimize("Slvl",60,55,93,1);
Blvl =
16;//Optimize("Blvl",16,5,55,1);
StochRsi=EMA((RSI(MAper)-LLV(RSI(MAper),MAper))/(HHV(RSI(MAper),MAper)-LLV(RSI(MAper),MAper)),3)*100;

SRs = StochRSI < Slvl;
SRb = StochRSI > Blvl;

//
CCI
pds =
17;//Optimize("pds",17,15,19,1);
I =
CCI(
pds );
Slv =
50;//Optimize("Slvl",50,00,150,10);
Blv =
-130;//Optimize("Blvl",-130,-150,20,5);
Is = I < Slv;
Ib = I > Blv;

//
MA20
Mper =
20;//Optimize("Mp",
16, 11, 34, 1);
M =
EMA(Close,
Mper);
Ms = Close < M;
Mb = Close > M;

// LT
Stochastic
sper =
39;//Optimize("sper",
31, 17, 33, 1);
sto =
MA(StochK(sper),5);
zs =
70;//Optimize("zs",
54, 30, 90, 2);
zb =
17;//Optimize("zb",
14, 8, 44, 2);
stos = sto < zs;
stob = sto > zb;

Filter = CMs OR SRs OR Is OR Ms OR
stos;

//Grid cells
text1 = WriteIf( CMO < 45, "CMO < 45","");
text2 = WriteIf( StochRSI < 65, "StochRSI < 65","");
text3 = WriteIf( I < 50, "CCI < 50","");
text4 = WriteIf( Close < M, "C < MA20","");
text5 = WriteIf( sto < 70, "LT Stoch < 70","");

//Headings
AddTextColumn(text1, "CMO < 45, Warning");
AddTextColumn(text2, "StochRSI < 65, Early Sell?");
AddTextColumn(text3, "CCI < 50, Sell?");
AddTextColumn(text4, "C < MA20, Late Sell?");
AddTextColumn(text5, "LT Stoch < 70, Last Resort Sell?");







Yahoo! Groups Sponsor


  ADVERTISEMENT  









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.




/*  Nag Nag Nag Exploration for exits.

This is designed to be run on the current holdings watch list every day.  If you have no trading system or your trading system is NOT as reliable as you like, this exploration will keep reminding you that the stock is going down.  IOW, it says, hey dumb A__, you're losing money here!

The indicators cover increasingly longer time frames from very short to last resort.

Select use filter for desired watch list and select n last days, n= 1, then Explore.
I follow up with a chart set up with the five indicators on it for visual confirmation.

Works well with stocks or mutual funds.

Sid Kaiser, V2.0, 10 Feb 2003  */


// ST CMO
per = 5;//Optimize("per",5,2,7,1);
CMO = scCMO(C,per);  //or you can write out your own function for CMO
SLevel = 45;//Optimize("SLevel",20,-30,90,2);
BLevel = -44;//Optimize("BLevel",-44,-90,20,2);
CMS = CMO < Slevel;
CMb = CMO > Blevel;

// StochRSI
MAper = 8;//Optimize("MAper",5,3,34,1);
Slvl = 65;//Optimize("Slvl",60,55,93,1);
Blvl = 16;//Optimize("Blvl",16,5,55,1);
StochRsi=EMA((RSI(MAper)-LLV(RSI(MAper),MAper))/(HHV(RSI(MAper),MAper)-LLV(RSI(MAper),MAper)),3)*100; 
SRs = StochRSI < Slvl;
SRb = StochRSI > Blvl;

// CCI
pds = 17;//Optimize("pds",17,15,19,1);
I = CCI( pds );
Slv = 50;//Optimize("Slvl",50,00,150,10);
Blv = -130;//Optimize("Blvl",-130,-150,20,5);
Is = I < Slv;
Ib = I > Blv;

// MA20
Mper = 20;//Optimize("Mp", 16, 11, 34, 1);
M = EMA(Close, Mper);
Ms = Close < M;
Mb = Close > M;

// LT Stochastic
sper = 39;//Optimize("sper", 31, 17, 33, 1);
sto = MA(StochK(sper),5);
zs = 70;//Optimize("zs", 54, 30, 90, 2);
zb = 17;//Optimize("zb", 14, 8, 44, 2);
stos = sto < zs;
stob = sto > zb;

Filter = CMs OR SRs OR Is OR Ms OR stos;

//Grid cells
text1 = WriteIf( CMO < 45, "CMO < 45","");
text2 = WriteIf( StochRSI < 65, "StochRSI < 65","");
text3 = WriteIf( I < 50, "CCI < 50","");
text4 = WriteIf( Close < M, "C < MA20","");
text5 = WriteIf( sto < 70, "LT Stoch < 70","");

//Headings
AddTextColumn(text1, "CMO < 45, Warning");
AddTextColumn(text2, "StochRSI < 65, Early Sell?");
AddTextColumn(text3, "CCI < 50, Sell?");
AddTextColumn(text4, "C < MA20, Late Sell?");
AddTextColumn(text5, "LT Stoch < 70, Last Resort Sell?");


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 01/27/2003