Experiments in Technical Analysis

Well, I was evaluating different trading systems and I found that the Swingchartretracement with 38% retracement gave something around 85% hit rate for Nifty stocks from beginning of this year. I am still checking whether I am missing something. This particular indicator is available in Fibotrader. May be Soumya may throw more light.
Anjan
Hi! Anjan,

I just tried the Swing Chart Retracement indicator. I used the default settings, ie Swingsize = 5 & Retracement = 50

I have a separate folder for BTST stocks of ICICI. I ran the filter (Buy call not more than 15 days) on the WEEKLY charts and got a Buy Call for 60 stocks.

Believe it or not, all the 60 stocks are up as of yesterday's closing price.

Need a clarification ...
When you say, 38% retracement, should I use the following settings:

Swingsize= 5
Retracement = 38

Looking forward to your reply & "Thanks a lot" for sharing this with us.

Thanks & regards,
Amit
 
Hi msldn
The metastock code for MABIUTS-H was posted by thetraderman in this thread. See message no.345. It has a small error and I have corrected it. The correct code is given below:

p1:=15;{15}
p2:=15;{15}
X:=mov(c,p1,E);
Y:=mov(X,p2,E);{signal}
D:=X-Y;
Buy:=ref(D,-2)>ref(D,-1) AND D>ref(D,-1);
Sell:=ref(D,-2)<ref(D,-1) AND D<ref(D,-1);
Bprice:=If(Buy,O,0);{Buy Price}
Sprice:=If(Sell,O,0);{Sell Price}
Bprice;
Sprice;

I hope this is what you wanted.

Happy trading
***Uma***

thank u for your replay
but i am newbi in ms
can u pls explain to me step by step how i can put this code in ms
 
Hi! Anjan,

I just tried the Swing Chart Retracement indicator. I used the default settings, ie Swingsize = 5 & Retracement = 50

I have a separate folder for BTST stocks of ICICI. I ran the filter (Buy call not more than 15 days) on the WEEKLY charts and got a Buy Call for 60 stocks.

Believe it or not, all the 60 stocks are up as of yesterday's closing price.

Need a clarification ...
When you say, 38% retracement, should I use the following settings:

Swingsize= 5
Retracement = 38

Looking forward to your reply & "Thanks a lot" for sharing this with us.

Thanks & regards,
Amit
Hi
You hit the bull eye man. Pl choose 38 instead of 50% and the gain improves. In fact, I did some optimization and got swing size 20 and ret 38 as best combination but for real 'swing' trading 5 should be ok. As I mentioned in backtest for nifty stocks from jan 06, 90% of the trade are profitable. Probably we can add other indicators to this and get better. And we are helping each other and pl don't thank me.
Anjan
 

asnavale

Well-Known Member
Hi Karthik,

Glad to see you back in the forum with your posts. Thanks for your observations and comments.

The main problem with the Mabiuts-H strategy is whipsaws. Too many trades and too many whipsaws. Can we really take all these trades?
It is true that there are too many trades in the MABIUTS-H. Many Whipsaws also. Originally I tried to reduce these with some other indicator but that was making the system more complicated and the advantages in profit making were also reduced. No system is perfect as you have observed. But our aim would be to get closer to a more perfect, or shall I say less imperfect, system. In order to avoid the delay in posting the strategies I decided to keep all the trades and test. In long term results I have as many as 80-100 trades in a pereiod of about 20 months. That works out nearly 2 trades per week on an average, but several trades are on consecutive days or within a couple of days. As members were waiting to know the codes for the four strategies and I was busy with some other work, I posted them hurriedly. I wanted to post some details for each strategy, their merits and demerits and the individual test results. Due to shortage of time I could not do it. In addition, some members wanted to know the reasons for moving average lag. I posted some write up on that. I am preparing the write up on comparison of the four strategies now and post shortly along with results..

I am working out some modifications so that we can reduce the number of trades and specially the whipsaws. But whatever known method I try it turns out to be as ineffective as not trying it. May be I have to come out of the routine thinking line and look at the whole system from some other angle like the Histogram idea. May be many learned and experienced people like you can also come up with some new ideas to improve the system.

Did you included commissions and taxes in your back testing.
The summary of results already posted is without commissions and taxes. The next post will include results with commissions and taxes. Some interesting results are there.

So in the Mabiuts-K strategy I had included price crossing the last peak ( cross(c,peak(c,2,1) function ) in order to minimize whipsaws. So the Mabiuts K strategy gives less number but more profitable trades.
Here you are mentioning the crossing of peak with the code :
CROSS(PEAK(C,2,1)) added to the BUY condition.
You had given the exploration AFL in Post No. 43 of this thread. I am reproducing it below:

("MABIUTS");
Buy=EMA(C,13)>EMA(EMA(C,13),9) AND Cross (C,Peak(C,5,1));
Sell=Cross (EMA(EMA(C,13),9),EMA(C,13));

Filter=Buy OR Sell;
SetOption("NoDefaultColumns", True );
AddColumn( DateTime(), "Date", formatDateTime );
AddTextColumn( FullName(), "Full name", 77 , colorDefault, IIf( Buy, colorGreen, colorRed ) );
AddColumn( IIf( Buy, 66, 83 ), "Signal", formatChar, colorDefault, bkcolor =IIf (Buy,colorGreen, colorRed ));
In this you have added the condition:
CROSS(PEAK(C,5,1)) to the BUY codition.
Now which one is correct? I wanted to ask this question since your earlier post but I think now it is right time to ask.

All the points you have brought out in your latest post are very relevant and I need more such comments from more people so that something more useful can be made out of these discussions.

Regards

-Anant
 

karthikmarar

Well-Known Member
Hi Ananth

The peak(c,n,1) function catch the last peak with a change of n%. If we use 5 meaning 5% changes the some of the smaller peaks are ignored. We can use 2% changes to catch the smaller peaks. This gives earlier entry and at the same time more whipsaws. Using 5% avoids whipsaws to some extent but the entry becomes delayed. One can experiment with different values of n. I am trying to change the value of 'n' based on the volatility of the stock under consideration and still experimenting :)

Warm regards

Karthik
.
 

rpc

Active Member
hi Karthik
I still have not understood fully the cross(C,Peak(C,5,1) condition .Does it mean the current close should be 5 %above the latest High or latest Close.Please clarify.
I ran MABIUTS on 9/11/06 alongwith additional condition of C > 100 and C < 200 I got 4 stocks of which 2 had close even lower than earlier close and high .I will give the details in my next post.
rpc
 

asnavale

Well-Known Member
Thank you Karthik for the clarification. I was wondering why you were using 2% in one code and 5% in another. Now I understood that you are experimenting with different values. Thanks once again for prompt reply and clarifying the doubt.

Regards

-Anant
 
hi Karthik
I still have not understood fully the cross(C,Peak(C,5,1) condition .Does it mean the current close should be 5 %above the latest High or latest Close.Please clarify.
I ran MABIUTS on 9/11/06 alongwith additional condition of C > 100 and C < 200 I got 4 stocks of which 2 had close even lower than earlier close and high .I will give the details in my next post.
rpc
Hi!

Karthik, please do reply as this has been addressed to you.

rpc, there is something wrong with the Mabiuts template (I think, Let's wait for a confirmation from Karthik).

Attached is a chart of BANKINDIA. I have marked 2 arrows towards the candles that the Mabiuts template should have given a Buy signal.

Karthik, please have a look at the chart that is attached and let us know if I am right or wrong.

More later ...

Thanks & regards,
Amit
 

Attachments

karthikmarar

Well-Known Member
hi Karthik
I still have not understood fully the cross(C,Peak(C,5,1) condition .Does it mean the current close should be 5 %above the latest High or latest Close.Please clarify.
I ran MABIUTS on 9/11/06 alongwith additional condition of C > 100 and C < 200 I got 4 stocks of which 2 had close even lower than earlier close and high .I will give the details in my next post.
rpc
Hi rpc

The peak(c,n,1) function detects the last peak. The n values which is 5 represents the percentage change for detection of peak. If we have higher % then bigger peaks are detected foregoing some of the smaller peaks and lower % values detects the smaller peaks as well.

Here what we are trying to do by the condition cross(c, peak(c,5,1) is that we are checking if the close value is greater than the the value at the last peak. In other words we are ensuring that the stock is going to make a higher high. This helps are to catch the trend early and also when the stock breaks out of a range. My experiments with various values of n show that 2% should be adequate for most stocks. I am enclosing a chart showing the same for better understanding.

Hope this is clear. If not feel free to ask.

warm regards

Karthik
 
Last edited:

karthikmarar

Well-Known Member
Hi!

Karthik, please do reply as this has been addressed to you.

rpc, there is something wrong with the Mabiuts template (I think, Let's wait for a confirmation from Karthik).

Attached is a chart of BANKINDIA. I have marked 2 arrows towards the candles that the Mabiuts template should have given a Buy signal.

Karthik, please have a look at the chart that is attached and let us know if I am right or wrong.

More later ...

Thanks & regards,
Amit
Hi Amit

You are right... the two signals are missing... chart enclosed

regards

Karthik
 
Last edited:

Similar threads