ignore bar afl

#1
can anybody please share AFL for IGNORE BAR . Basically it generates buy/sell signal for candles in " green-red-green=buy" & "red-green-red=sell" signals. it is available in pine script in tradingview.com by oliver velez under heading" RED AND GREEN IGNORED BAR BY OLIVER VELEZ" ( with more than 1242 likes ) but its in spanish language although its logic is correct. but I don't know anything about converting pine script to afl. it has facility to scan also ( to get list of stocks fufilling buy/sell conditions)
my email:- [email protected]
 

Romeo1998

Well-Known Member
#2
can anybody please share AFL for IGNORE BAR . Basically it generates buy/sell signal for candles in " green-red-green=buy" & "red-green-red=sell" signals. it is available in pine script in tradingview.com by oliver velez under heading" RED AND GREEN IGNORED BAR BY OLIVER VELEZ" ( with more than 1242 likes ) but its in spanish language although its logic is correct. but I don't know anything about converting pine script to afl. it has facility to scan also ( to get list of stocks fufilling buy/sell conditions)
my email:- [email protected]
Code:
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
Plot( C, "",1,64);

Buy = Ref(O,-1)<Ref(C,-1) AND Ref(O,-2)>Ref(C,-2) AND Ref(O,-3)<Ref(C,-3);
Sell = Ref(O,-1)>Ref(C,-1) AND Ref(O,-2)<Ref(C,-2) AND Ref(O,-3)>Ref(C,-3);

PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),1,0,L,-12);
PlotShapes(IIf(Sell,shapedownArrow,shapeNone),1,0,H,-12);

Filter = Buy OR Sell;
AddColumn(IIf(Buy,O,Null),"Buy",1.2,1,27);
AddColumn(IIf(Sell,O,Null),"Sell",1.2,1,4);

_SECTION_END();
1632793773630.png

1632793799181.png


good luck :)
shaun-the-sheep-thumbs-up.gif
 

Similar threads