Metastock code

#1
Dear Members,

I will be grateful if the following code is explained in the trading terms as i am a novice in programming:

Buy=
Cross((Mov((RSI(12)-LLV(RSI(12),12)) / (HHV(RSI(12),12)- (LLV(RSI(12),12))),3,E)*100),8)
sell=
Cross(20,(Mov((RSI(14) -LLV(RSI(14),14)) / (HHV(RSI(14),14) - (LLV(RSI(14),14))),3,E)*100))

Regards:)
 

karthikmarar

Well-Known Member
#2
Hi

It is nothing but the stochastic of RSI. The period used is 12. However there seems to be a typo here . I think 8 should read as 80.

However strangely the buy and sell conditions also seems to different from the standand. Here the buy signal is when the Stochastic of RSI (SOR) crosses above 80 and sell when it crosses below 20. The standard way is to buy when the SOR cross above 20 from below and sell when it crosses down below 80. If we wait for the signal to cross above 80 then it will be too late. because of this the entry is delayed. It seems to catch some nice moves but can create havoc ina sideways market.

regards

karthik
 

rkgoyal_98

Well-Known Member
#3
Hello,


I am novice so this is just a thought.
This may be for Stochastic Pop where in Buy is when indicator just go above 80 to cash on momentum.

Rajeev
 

oxusmorouz

Well-Known Member
#4
Dear Members,

I will be grateful if the following code is explained in the trading terms as i am a novice in programming:

Buy=
Cross((Mov((RSI(12)-LLV(RSI(12),12)) / (HHV(RSI(12),12)- (LLV(RSI(12),12))),3,E)*100),8)
sell=
Cross(20,(Mov((RSI(14) -LLV(RSI(14),14)) / (HHV(RSI(14),14) - (LLV(RSI(14),14))),3,E)*100))

Regards:)
For buy:
A = 12 day RSI
B = 12 day low of "A"
C = 12 day high of "A"

It is made into an oscillator similar to stochastic but uses RSI as time series instead of price.
Let this be called "D"

D = 100 * (A - B)/(C - B)

F = 3 day exponential moving average of "D"
F here is the smoothed value which is created to eliminate voilent and frequent whipsaws.

Long Entry:- Buy when F crosses value 8 from below.

Repeat the same exercise for sell with the only exception being a 14 day RSI instead of 12.
Short Entry:- Short when F crosses value 20 from below

It seems to catch some nice moves but can create havoc ina sideways market.

regards

karthik
Doesn't it always? [;)]
 
#5
Dear Senior members,

Thanks a lot for the explanation. It would be nice if i am also enlighten as to how to scan the whole stock in metastock for the buy and sell conditions as envisaged in the formula.It would be a great help.

Regards:)
 

oxusmorouz

Well-Known Member
#6
Tools ---> Explorer ---> New

Paste "Buy" input in coloumn A. Paste the "Sell" input in coloumn B.
Go to filter. Enter "ColA or ColB"

Please go through the metastock manual for further reference
 

Similar threads