Flipt indicator

#1
FlipIt indicator

I have seen FliIt indicator at GCI Financials CFD Share Trading Demo. The indicator is here in AFL form


_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
SetBarsRequired(sbrAll,sbrAll);
SetBarFillColor(IIf(C>O,ParamColor("Candle Up Color", colorBrightGreen),IIf(C<=O,ParamColor("Candle Down Color", colorRed),colorLightGrey)));
Plot(C,"Price",IIf(C>O,ParamColor("Shadow Up Color", colorBlack),IIf(C<=O,ParamColor("Shadow Down Color", colorBlack),colorLightGrey)),64,0,0,0,0);
SetChartBkColor(ParamColor("Panel Color ",colorLightGrey));
SetChartBkGradientFill(ParamColor("Upper Chart",colorLightGrey),ParamColor("Lower Chart",colorLightGrey));

grid_day = IIf(Day()!=Ref(Day(),-1),1,0);
Plot(grid_day,"",colorWhite,styleHistogram|styleDots|styleNoLabel|styleOwnScale);


_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Price Color", colorBlack ), styleNoTitle | ParamStyle("Price Style") | GetPriceStyle() );


_SECTION_END();

t=Param("t", 24, 1, 100, 1);

Top = Sum(High, t) / t;
Bottom = Sum(Low, t) / t;
av=(Top+Bottom)/2;
mc=IIf(av>C, colorRed, colorGreen);
Plot(av, "", mc, styleStaircase);
 

Attachments

Last edited:

XRAY27

Well-Known Member
#3
Dear sir...... have to watch this in live market for some more days
 
#7
I am agree, but most of indicator do not work in side way/range bound market. We have to use filters. OCIL has done a good job. I request him to post AFL.
 

ocil

Well-Known Member
#10
Here is the AFL for LT future 20M chart. Run the scan & see the performance.. Enjoy...SL 40 POINT TGT 135 POINT OR EXIT SIGNAL

_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
SetBarsRequired(sbrAll,sbrAll);
SetBarFillColor(IIf(C>O,ParamColor("Candle Up Color", colorBrightGreen),IIf(C<=O,ParamColor("Candle Down Color", colorRed),colorLightGrey)));
Plot(C,"Price",IIf(C>O,ParamColor("Shadow Up Color", colorBlack),IIf(C<=O,ParamColor("Shadow Down Color", colorBlack),colorLightGrey)),64,0,0,0,0);
SetChartBkColor(ParamColor("Panel Color ",colorLightGrey));
SetChartBkGradientFill(ParamColor("Upper Chart",colorLightGrey),ParamColor("Lower Chart",colorLightGrey));

grid_day = IIf(Day()!=Ref(Day(),-1),1,0);
Plot(grid_day,"",colorWhite,styleHistogram|styleDots|styleNoLabel|styleOwnScale);


_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Price Color", colorBlack ), styleNoTitle | ParamStyle("Price Style") | GetPriceStyle() );


_SECTION_END();

SetChartBkColor( ParamColor( "Outer panel",colorWhite) );
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
_SECTION_BEGIN("trending ribbon");
uptrend=PDI()>MDI() AND MACD()>Signal();
downtrend=MDI()>PDI() AND Signal()>MACD();
Plot( 3, /* defines the height of the ribbon in percent of pane width */"",
IIf( uptrend , colorLime, IIf( downtrend ,
colorRed, colorTan)) , /* choose color */styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
_SECTION_END();

//===============system================

T=Param("T", 24, 1, 100, 1);

Top = Sum(High, T) / T;
Bottom = Sum(Low, T) / T;
av=(Top+Bottom)/2;
mc=IIf(av>C, colorRed, colorGreen);
a=av<C;
b=av>C;
Buy=Cover= Cross(a,b) AND uptrend;
Sell=Short= Cross(b,a) AND downtrend;


SellPrice=ValueWhen(Sell,C,1);
BuyPrice=ValueWhen(Buy,C,1);
Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy );

Plot(av, "", mc, styleStaircase);

PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-40);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-50);
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-45);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorRed, 0, H, Offset=40);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorOrange, 0,H, Offset=50);
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-45);

dist = 4.5*ATR(20);

for( i = 0; i < BarCount; i++ )
{
if( Buy ) PlotText( "Buy\n@" + C[ i ], i, L[ i ]-dist, colorGreen,colorYellow );

if( Sell ) PlotText( "Sell\n@" + C[ i ], i, H[ i ]+dist, colorRed, colorYellow );

}
 

Similar threads