help to write afl

mrm

New Member
#1
In Connors book he is using combination of rsi 2 today and yesterday as indicator. please help me to write afl
rsic= rsi2 today +rsi2 yesterday
plot rsic
buy Rsic bellow 35
sell rsic above 65
Thanks
 

mrm

New Member
#2
PLEASE PLEASE HELP
I don"t know how to write this AFL
With lots of smart people on this site is anybody who can help me to write this AFL
RSIC=RSI(2) TODAY PLUS RSI(2) YESTERDAY
PLOT=RSIC
BUY= RSIC BELLOW 35
SELL= RSIC ABOVE 65
 
#3
mrm

please try the following code

SetChartOptions(2,chartShowDates);
GraphXSpace=5;
Plot(C,"Close",colorBlack,styleCandle);
rsic=RSI(2)+Ref(RSI(2),-1);
Plot(rsic,"RSIC",colorBlue,styleDashed|styleOwnScale);
Buy=rsic<35;
Sell=rsic>65;
Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorBlue);
PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorRed);

vidyasagar
 

mrm

New Member
#4
Thank you for your help. It is working
You are very kind
is it possible to have buy rule to buy only if stock is trading above sma200?
 
#5
mrm

change the code as below

SetChartOptions(2,chartShowDates);
GraphXSpace=5;
Plot(C,"Close",colorBlack,styleCandle);
rsic=RSI(2)+Ref(RSI(2),-1);
Plot(rsic,"RSIC",colorBlue,styleDashed|styleOwnScale);
Buy=rsic<35 AND C>MA(C,200);
Sell=rsic>65;
Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorBlue);
PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorRed);

vidyasagar
 

mrm

New Member
#6
Thanks again
Just run backtest and idea is not worthed and loose money trading it
Just wasted $15 bying his book
 
#7
Dear Friends
Pls help me if you can write the afl for amibroker for the following

Buy :
if EMA of 5 day > 20 > 50
+DMI > - DMI
RSI > 50

Sell if

if EMA of 5 day < 20 < 50
+DMI < - DMI
RSI < 50

Wating for reply
Regards
 

Similar threads