Conversion of metastock formula to amibroker code

#1
Can anyone plz convert Metastock formula to amibroker code with exploration and buy/sell signal


Cross(CLOSE,Mov(CLOSE,5,E)) AND CLOSE > Mov(CLOSE,5,E)
 
#2
hi

here is the code.
it is not worth as it has no quality.
Remember,just one ema5 is not enough to trade profitably.you need much more

ford

HTML:
EMA5 =EMA(C,5);
Plot(EMA5,"EMA5",colorBlue,styleLine);
Plot(C,"C",colorRed,styleCandle);
Buy = Cross(C,EMA5) AND C>EMA5 ;
Sell = Cross(EMA5,C) AND C<Ref(C,-1) ;
//Buy =ExRem(Buy,Sell); Sell =ExRem(Sell,Buy);
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, Low, High ) );
Filter=Buy OR Sell ;
AddColumn(Close,"close",1.2);
AddColumn(Buy,"BUy",1.2);
AddColumn(Sell,"sell",1.2);
AddColumn(Volume,"volume",1.0);
 
#3
Many many thanks Ford7k...Its working fine....

Now can u plz add 02 more conditions for buying ADX more than 20 and Rsi more than 50...Sell is false
 

johnnypareek

Well-Known Member
#4
Many many thanks Ford7k...Its working fine....

Now can u plz add 02 more conditions for buying ADX more than 20 and Rsi more than 50...Sell is false
sell is false?? means u don't need sell condition, basis on that here it is.
HTML:
EMA5 =EMA(C,5);
Plot(EMA5,"EMA5",colorBlue,styleLine);
Plot(C,"C",colorRed,styleCandle);
Buy = Cross(C,EMA5) AND C>EMA5 AND ADX()>20 AND RSI()>50;
//Sell = Cross(EMA5,C) AND C<Ref(C,-1) ;
//Buy =ExRem(Buy,Sell); Sell =ExRem(Sell,Buy);
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, Low, High ) );
Filter=Buy OR Sell ;
AddColumn(Close,"close",1.2);
AddColumn(Buy,"BUy",1.2);
AddColumn(Sell,"sell",1.2);
AddColumn(Volume,"volume",1.0);
 

KelvinHand

Well-Known Member
#6
Can anyone plz convert Metastock formula to amibroker code with exploration and buy/sell signal


Cross(CLOSE,Mov(CLOSE,5,E)) AND CLOSE > Mov(CLOSE,5,E)
This logic look something weir to me.
If CLOSE CROSS 5EMA, isn't close above 5EMA ?
Why still need AND to make sure Close must above 5EMA ?
 
Last edited:

Similar threads

Intraday Higher Leverage

Save up to 90% in brokerage and get higher leverage for intraday trades.

Name:Phone:
Email:City:
State:
Are you a day trader?