Candle NOT touching EMA

#1
Hi Friends,

How can we provide an indication if a candle is not touching an EMA line.

For example, I need to see an arrow or any symbol when 5 min candle is not touching 4 ema. How do I code this?
 

rkkarnani

Well-Known Member
#2
Hi Friends,

How can we provide an indication if a candle is not touching an EMA line.

For example, I need to see an arrow or any symbol when 5 min candle is not touching 4 ema. How do I code this?
In Metastock :

a:=Mov(C,4,E);


C>a AND L>a OR C<a AND H<a

Make an Expert , and use the Bar colour youdesire in Highlights...
 

rajeabc

Well-Known Member
#4
Hi Friends,

How can we provide an indication if a candle is not touching an EMA line.

For example, I need to see an arrow or any symbol when 5 min candle is not touching 4 ema. How do I code this?
you can use distance from close price with EMA(4) to generate you singal..
Ex: If EMA(4) is 100 and price came to 99/101 away then you can use condition
when Close price is in range of 1% generate signal....you can combined with your other conditions...
 

rkkarnani

Well-Known Member
#5
you can use distance from close price with EMA(4) to generate you singal..
Ex: If EMA(4) is 100 and price came to 99/101 away then you can use condition
when Close price is in range of 1% generate signal....you can combined with your other conditions...
If possible post a formula for Metastock for any hypotetical parameters, wil help us to understand better.
Thanks.
 

rajeabc

Well-Known Member
#6
If possible post a formula for Metastock for any hypotetical parameters, wil help us to understand better.
Thanks.
rkkarnani ,

I use Ami .. no exp in Meta.
Below is an example which I use for my Intraday trading.
This write a text on chart when price reaches in defined band.

Code is just for logic .
----------------------------------------
band_low = C-.002*C ;
Band_High = c-.002*C ;
c_near_res1= band_low < res1 and band_high > res1

WriteIf ( C_near_r1 ,EncodeColor(colorWhite)+"Trading near RES1"+"("+WriteVal(RES1,1.0)+ ")
 
#7
In Metastock :

a:=Mov(C,4,E);


C>a AND L>a OR C<a AND H<a

Make an Expert , and use the Bar colour youdesire in Highlights...
DID it buddy with some modifications.

Thanks a lot to all who have been so generous with your help, time and effort.

Sanjeev Bhatia

Thread closed. (don't know how to do it)
 

rkkarnani

Well-Known Member
#8
rkkarnani ,

I use Ami .. no exp in Meta.
Below is an example which I use for my Intraday trading.
This write a text on chart when price reaches in defined band.

Code is just for logic .
----------------------------------------
band_low = C-.002*C ;
Band_High = c-.002*C ;
c_near_res1= band_low < res1 and band_high > res1

WriteIf ( C_near_r1 ,EncodeColor(colorWhite)+"Trading near RES1"+"("+WriteVal(RES1,1.0)+ ")
Oh okay, I hv no idea abt Ami at all... :eek:
 

rkkarnani

Well-Known Member
#9
DID it buddy with some modifications.

Thanks a lot to all who have been so generous with your help, time and effort.

Sanjeev Bhatia

Thread closed. (don't know how to do it)
Good to know that I was of some help... do share here for others the modifications you made to get what you desired... such exchanges help us all grow better. :D
 

Similar threads