Experiments in Technical Analysis

aad

Active Member
Hi karthik,

Could you please help me filter stocks that have closed above the 23 and 30 day Simple Moving Average. But I do not want stock that are already above it. I want a stock that was below it and today crossed and closed above both the moving averages. I am using MS. I would be grateful.
Dear Rahul,

Here goes the exploration code for MetaStock.

--------------
EMA23:=Mov(C,23,E);
EMA30:=Mov(C,30,E);

C>=EMA23 AND C>=EMA30 AND
Ref(C,-1)<EMA23 AND Ref(C,-1)<EMA30;
--------------

Regards,

Abhay
 

marcus

Active Member
Actually I'm waiting & hoping someone will talk about the VIX, this is the most powerful indicator to trade index futures and is rumoured to be accurate well over 70% of the time, its widely used by S&P 500 futures traders. I'm hoping to replace it with my RSI in the nifty trading system I mentioned.
 

karthikmarar

Well-Known Member
Dear Marcus

As far I know VIX is a volatility Index from CBOE and provides an indication of the implied volatility. This is worked out on the basis of range of option in the S&P. As far I know we do not have anything equivalant for NSE or BSE.
Iam not aware of any other indicator named VIX.

Please do correct me if Iam wrong.

regards

Karthik
 
Dear Rahul,

Here goes the exploration code for MetaStock.

--------------
EMA23:=Mov(C,23,E);
EMA30:=Mov(C,30,E);

C>=EMA23 AND C>=EMA30 AND
Ref(C,-1)<EMA23 AND Ref(C,-1)<EMA30;
--------------

Regards,

Abhay
Hi Abhay,

Thank you for the formula. Another thing do i put the entire formula in the filter column. How will it work. To Change ema to SMA we change it in this formulae itself.

What does in E in the end of EMA23:=Mov(C,23,E); stand for.

And what does C>=EMA23 AND C>=EMA30 AND
Ref(C,-1)<EMA23 AND Ref(C,-1)<EMA30, stand for. Whta does this formulae tell us. If u could explain this maybe it will help me also develop a sense of how it works.

Rgds

Rahul
 

karthikmarar

Well-Known Member
Dear Karthik,

Will that help ? I mean, if you know the answer is not there but somewhere else (which probably calls for deeper study), can we concentrate on something just because it is simpler ?

I personally do not think that this thread is becoming too technical or complex. Afterall, how do you expect TECHNICAL Analysis to be ? And I have read many threads which had more complexity (you have not started yet, I believe)...

I sincerely feel that you should continue with this work. I have been a regular reader of this thread, although I have not been able to keep up due to some other committments in recent time. May be the same case with others why they might have not replied to this thread.

I see too many new posts now-a-days, so by the time you come to your favourite ones, you are out of time / energy. This is happening with me recently.

May be you start entertaining BUY/SELL recommendations in this thread.... it will drastically improve the "hit rate" of this thread :D (just kidding... no offence intended).

With regards,

Abhay
Dear Abhay,

Thanks for expressing you views. True, We cannot really restrict ourselves to that the simple things. Talking about the complexities in Technical Analysis, during the course of my journey in the realm of Technical analysis, I have realized one thing. The new age Technical Indicators do have an edge over the conventional simplistic indicators like MACD, RSI etc if they are understood and applied properly. After all the conventional moving averages are nothing but linear digital filters similar to the ones used widely in physics and day-to-day electronics. So we can go into more complex filters to get better results. The possibilities are enormous. In fact I am fascinated by Ehlers work. But they are a bit too complex for the common man.

True, Abay TIPS are good to attract more hits. But it was not about hits. The apprehensions was whether the members were really finding it useful or am I just wasting digital space :)

regards

karthik
 

karthikmarar

Well-Known Member
Hi karthik,

Some member talks about Contra Trend following system. I request you please throw some light on this topic with example.

I want your help to create a metastock code.
Sell condition : When today price cross the 90% of Buy price or the price when Last buy signal generate

Regards,

(moneypick)
Dear Moneypick.

Since I dont do contra trend trading I am not the authority to talk about it. Anyway I will share what little I know.

Contra trend or counter trend trading is a strategy by which a trader takes a position contrary to the current market direction in anticipation of a change in that direction. In other words the trader attempts to make small gains through trades against the ongoing trend. If a market is hitting new lows, chances are its going to at least have a short-term bounce. Same way if the market is hitting new highs the chances are that it will have short pullbacks.
Many counter-trend investors use momentum indicators to determine the best times to execute their trades. But the momentum indicators are prone to give many false signals. The daily close or weekly close prices give much better indications of the short term pullbacks or bounces and are more reliable. I will try to get some examples of contra trend trading system later.

The metastock code.... I am having problems with my metastock, yet to reinstall.. Maybe our good friend Abhay can help out...

warm regards

Karthik
 

aad

Active Member
Hi Abhay,

Thank you for the formula. Another thing do i put the entire formula in the filter column. How will it work. To Change ema to SMA we change it in this formulae itself.

What does in E in the end of EMA23:=Mov(C,23,E); stand for.

And what does C>=EMA23 AND C>=EMA30 AND
Ref(C,-1)<EMA23 AND Ref(C,-1)<EMA30, stand for. Whta does this formulae tell us. If u could explain this maybe it will help me also develop a sense of how it works.

Rgds

Rahul
Dear Rahul,

Yes.. you have to put entire formula in filter column. Since you are curious to know how it is written, here is the explaination, line by line.

EMA23:=Mov(C,23,E);

Here, we have defined a variable EMA23 (you can give any name) as moving average (MOV) of closing price (C) of 23 candles (23) and it is exponential type (E). When you are in filter column, click on the "functions" button to see all the functions and their syntax. Here if you replace E by S, it will calculate Simple MA.

EMA30:=Mov(C,30,E);

Same as above. Only thing replaced is no. of candles i.e. 30.

These first 2 lines are just the definitions of the variables. Now comes the condition in the last line. The exploration will show only those scrips which will satisfy following condition.

C>=EMA23 AND C>=EMA30 AND Ref(C,-1)<EMA23 AND Ref(C,-1)<EMA30;

In this condition, we need to now check if today's closing price (C) is more than or equal to (>=) EMA23 and (AND) EMA30. Alongwith these 2 conditions, you also want to satisfy the conditions that yesterday's closing price (ref(C,-1) - here we are referring to (ref) closing price (C) one day prior. -1 denotes 1 candle prior, -2 if used, will denote 2 candles prior... and so on) is less than (<) EMA23 and (AND) EMA30.

Since we have used the operator AND inbetween all these conditions, the exploration will show those scrips which satisafy ALL of these 4 conditions. You can also use OR, if-then loop, etc. as per your needs.

Note that I have used "candles" and not "days". So, when you change the periodicity (daily, weekly, quarterly, hourly... and so on), calculation still holds good. i.e. when charts are viewed with daily periodicity, EMA23:=Mov(C,23,E) will calculate 23 "day" EMA of closing price. When periodicity is changed to weekly, the same above formula will calculate 23 "week" EMA of closing price, and so on.

I hope this helps. Please let me know if you still have any doubts.

With regards,

Abhay
 

aad

Active Member
Dear Moneypick.

Contra trend or counter trend trading is a strategy by which a trader takes a position contrary to the current market direction in anticipation of a change in that direction.
Is this what Alexander Elder refers to as "fading against" ? Think so.

I am having problems with my metastock, yet to reinstall.. Maybe our good friend Abhay can help out...

warm regards

Karthik
Sorry moneypick for disappointing you. I DO NOT use buy/sell signals, although they can be generated using the code that one can write. My reason is simple. I consider myself as a learner and hence I want to stay away from mechanical trading systems as far as possible. I want to see the chart EVERYTIME and other signaling parameters (like indicators, volume, etc.) based on which, I take decisions. BUY/SELL signals generated using certain criteria (code) may or may not work everytime. I use simple filters to select stocks worthy of trading first and then analyse each and every filtered stock manually. I know this takes time but it trains me to analyse stocks faster and in newer ways... it also keeps my eyes open to other things which does not happen if we trade based on BUY/SELL signals generated by system.

The correct person to help you with code you want is aca_trader (Ashish). I am sure he has all the expertise to give you a solution for your requirements.

Best regards,

Abhay
 

marcus

Active Member
Dear Marcus

As far I know VIX is a volatility Index from CBOE and provides an indication of the implied volatility. This is worked out on the basis of range of option in the S&P. As far I know we do not have anything equivalant for NSE or BSE.
Iam not aware of any other indicator named VIX.

Please do correct me if Iam wrong.

regards

Karthik
Hi Karthik,

Yup thats the one, thanks for your kind view. Do you know how the CBOE actually calculate the vix and based on the same calculation can we plot a vix for the NSE.
 

Similar threads