Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

15 minute intraday for Amibroker (AFL)

Rating:
3 / 5 (Votes 2)
Tags:
amibroker

This is an intraday afl I have not coded this but just add some formula it works in 15min.or above time frame..just take trade above yelowline or below good result.

Similar Indicators / Formulas

Kavach Of Karna v2
Submitted by hbkwarez over 5 years ago
Advanced Elliott Waves
Submitted by MarcosEn almost 8 years ago
3_6Day GuaiLiLv
Submitted by motorfly almost 8 years ago
Williams Alligator System
Submitted by durgesh1712 almost 8 years ago
*Level Breakout system*
Submitted by Tinych almost 8 years ago
Horizontal Live Priceline Tool
Submitted by northstar almost 8 years ago

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("graph");  
SetChartOptions(0,chartShowArrows|chartShowDates);      
gxs=Param("GRAPH spaceing",10,5,50,5);  
GraphXSpace = gxs; 
strWeekday = StrMid("SunMonTueWedThuFriSat", SelectedValue(DayOfWeek())*3,3);
_SECTION_END(); 
_SECTION_BEGIN("Intraday ");    
k =  Optimize("K",Param("K",1.75,1,5,0.25),1,5,0.25); 
Per= Optimize("atr",Param("atr",10,3,30,1),3,30,1); 
j=(O+H+L+C)/4; 
nm= (H-L);
rfsctor = WMA(nm, PER); 
revers = K * rfsctor; 
Trend = 1;   
NW[0] = 0;   
for(i = 1; i < BarCount; i++) 
{ 
 if(Trend[i-1] == 1)                 
 { 
  if(j[i] < NW[i-1])                  
  { 
   Trend[i] = -1;                    
   NW[i] = j[i] + Revers[i];         
  } 
  else                               
  { 
   Trend[i] = 1; 
   if((j[i] - Revers[i]) > NW[i-1]) 
   { 
    NW[i] = j[i] - Revers[i];  
   } 
   else 
   { 
    NW[i] = NW[i-1]; 
   } 
  }  
 } 
 if(Trend[i-1] == -1)                
 { 
  if(j[i] > NW[i-1])                 
  { 
   Trend[i] = 1;                     
   NW[i] = j[i] - Revers[i];         
  } 
  else                               
  { 
   Trend[i] = -1; 
   if((j[i] + Revers[i]) < NW[i-1])  
   { 
    NW[i] = j[i] + Revers[i];  
   } 
   else 
   { 
    NW[i] = NW[i-1]; 
   } 
  } 
 } 
} 

Plot(NW, "", IIf(Trend == 1, 6, 4), 4); 

//---------------trading  -------------

Buy=Cover=Cross(j,nw);
Sell=Short=Cross(nw,j);
Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
Short=ExRem(Short,Cover);
Cover=ExRem(Cover,Short);
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorSkyblue, 0,Low,-15);  
PlotShapes(IIf(Sell, shapeHollowDownArrow, shapeNone),colorLightYellow, 0,High,-15);  
PlotShapes(IIf(Cover, shapeHollowCircle, shapeNone),colorTan, 0,Close,0);  
PlotShapes(IIf(Short, shapeDownArrow, shapeNone),colorGold, 0,High,-25); 
//-----------end--------------
Long=Flip(Buy,Sell OR Cover); 
Shrt=Flip(Sell,Buy OR Cover); 
NOTrade= NOT (Long OR shrt);
Edc=(
WriteIf (Buy AND Ref(shrt,-1), " GO LONG / Reverse Signal at "+C+"  ","")+ 
WriteIf (Buy AND Ref(NOTrade,-1), " GO LONG at "+C+"  ","")+   
WriteIf (Sell AND Ref(NOTrade,-1), " GO Short at "+C+"  ","")+ 
WriteIf (Sell AND Ref(Long,-1), " EXIT LONG / Reverse Signal at "+C+"  ",""));
_SECTION_END();
grid_day = IIf(Day()!=Ref(Day(),-1),1,0);  
Plot(grid_day,"",colorDarkGrey,styleHistogram|styleDashed|styleNoLabel|styleOwnScale);
///--------------------------------------------------------------------------------------------------

UpCandle = ParamColor("Up Color", colorBrightGreen ); 
DownCandle = ParamColor("Down Color", colorDarkRed );
Consolidation = ParamColor("Consolidation", colorBlack ); 
BG2a=HHV(LLV(L,4)+ATR(4),8); 
BR2a=LLV(HHV(H,4)-ATR(4),8);
Candlecolor = IIf(Close>BG2a ,UpCandle,IIf(Close < BR2a,DownCandle,Consolidation)); 
SetBarFillColor( IIf(O <C, colorSeaGreen,colorOrange) ); 
Plot( Close, "Price", CandleColor, styleCandle ); 
TimeFrameSet( 2*Interval() );
BG2=HHV(LLV(L,4)+ATR(4),8); 
BR2=LLV(HHV(H,4)-ATR(4),8);
C1=C; 
TimeFrameRestore();
M5 = TimeFrameExpand(BG2,2*Interval() );
MM5=TimeFrameExpand( BR2,2*Interval() );
cM5=TimeFrameExpand( C1, 2*Interval() );
TimeFrameSet( 4*Interval() );
BG2=HHV(LLV(L,4)+ATR(4),8); 
BR2=LLV(HHV(H,4)-ATR(4),8); 
C1=C;  
TimeFrameRestore();
M15 = TimeFrameExpand(BG2,4*Interval() );
MM15=TimeFrameExpand(BR2,4*Interval() );
cM15=TimeFrameExpand( C1,4*Interval() );
TimeFrameSet( 6*Interval() );
BG2=HHV(LLV(L,4)+ATR(4),8); 
BR2=LLV(HHV(H,4)-ATR(4),8);
C1=C; 
TimeFrameRestore();
M30 = TimeFrameExpand(BG2,6*Interval() );
MM30=TimeFrameExpand(BR2,6*Interval() );
cM30=TimeFrameExpand( C1,6*Interval() );
TimeFrameSet( 8*Interval() );
BG2=HHV(LLV(L,4)+ATR(4),8); 
BR2=LLV(HHV(H,4)-ATR(4),8);
C1=C; 
TimeFrameRestore();
H1 = TimeFrameExpand(BG2 ,8*Interval() );
HH1=TimeFrameExpand( BR2,8*Interval() );
Ch1=TimeFrameExpand( C1,8*Interval() );
TimeFrameSet( 16*Interval() );
BG2=HHV(LLV(L,4)+ATR(4),8); 
BR2=LLV(HHV(H,4)-ATR(4),8); 
C1=C;  
TimeFrameRestore();
H4 = TimeFrameExpand( BG2,16*Interval() );
HH4=TimeFrameExpand( BR2,16*Interval() );
cH4 = TimeFrameExpand( C1,16*Interval() );
Com=("\n "+Name()+ " - Trend  in  ")+"\n "+
EncodeColor(colorLightGrey)+(""+Interval(2)+":")+
WriteIf(Close>BG2a,EncodeColor(colorLime)+" UP",WriteIf(Close<BR2a,EncodeColor(colorRed)+" DN",EncodeColor(colorGrey50)+" ~~"))+
EncodeColor(colorLightGrey)+("   "+2*Interval()/60+"m:")+
WriteIf(Cm5>M5,EncodeColor(colorLime)+"  UP",WriteIf(Cm5<MM5,EncodeColor(colorRed)+"  DN",EncodeColor(colorGrey50)+"  ~~"))+
EncodeColor(colorLightGrey)+("   "+4*Interval()/60+"m:")+
WriteIf(Cm15>M15,EncodeColor(colorLime)+"  UP",WriteIf(Cm15<MM15,EncodeColor(colorRed)+"   DN",EncodeColor(colorGrey50)+"   ~~"))+
EncodeColor(colorLightGrey)+("   "+6*Interval()/60+"m:")+
WriteIf(Cm30>M30,EncodeColor(colorLime)+"   UP",WriteIf(Cm30<MM30,EncodeColor(colorRed)+"    DN",EncodeColor(colorGrey50)+"    ~~"))+
EncodeColor(colorLightGrey)+("  "+8*Interval()/60+"m:")+
WriteIf(CH1>H1,EncodeColor(colorLime)+"      UP",WriteIf(CH1<HH1,EncodeColor(colorRed)+"      DN",EncodeColor(colorGrey50)+"     ~~"))+
EncodeColor(colorLightGrey)+("  "+16*Interval()/60+"m: ")+
WriteIf(Ch4>H4,EncodeColor(colorLime)+"       UP",WriteIf(Ch4<HH4,EncodeColor(colorRed)+"      DN",EncodeColor(colorGrey50)+"    ~~" ));
//---------------------------------------------------------------------------------------
Vr=ParamList("Index",List = "^NSEI,^NSEBANK,NIFTY_F1,RELIANCE.NS,SBIN.NS,EURUSD,XAUUSD,GOLD",0); 
SetForeign(Vr);
HaC =(O+H+L+C)/4; 
HaO = AMA( Ref( HaC, -1 ), 0.5 );  
HaH = Max( H, Max( HaC, HaO) ); 
HaL = Min( L, Min( HaC, HaO) );
HBG=HHV(LLV(HaL,4)+ATR(4),8); 
HBR=LLV(HHV(HaH ,4)-ATR(4),8); 
co = IIf(Hac>HBG ,colorAqua,IIf(Hac < HBR,colorCustom12,colorGrey50)); 
Plot(4, "", Co,styleArea+styleOwnScale | styleNoLabel, -1, 100);
//PlotOHLC(HaO,HaH,HaL,HaC, "", Co,styleCandle|styleOwnScale );
//=====================================================================================
TimeFrameSet( 2*Interval() );
BG2H=HHV(LLV(HaL,4)+ATR(4),8); 
BR2H=LLV(HHV(HaH,4)-ATR(4),8);
C1H=HaC; 
TimeFrameRestore();
M5H = TimeFrameExpand(BG2H,2*Interval() );
MM5H=TimeFrameExpand( BR2H,2*Interval() );
cM5H=TimeFrameExpand( C1H, 2*Interval() );
TimeFrameSet( 4*Interval() );
BG2H=HHV(LLV(HaL,4)+ATR(4),8); 
BR2H=LLV(HHV(HaH,4)-ATR(4),8); 
C1H=HaC;  
TimeFrameRestore();
M15H = TimeFrameExpand(BG2H,4*Interval() );
MM15H=TimeFrameExpand(BR2H,4*Interval() );
cM15H=TimeFrameExpand( C1H,4*Interval() );
TimeFrameSet( 6*Interval() );
BG2H=HHV(LLV(HaL,4)+ATR(4),8); 
BR2H=LLV(HHV(HaH,4)-ATR(4),8);
C1H=HaC; 
TimeFrameRestore();
M30H = TimeFrameExpand(BG2H,6*Interval() );
MM30H=TimeFrameExpand(BR2H,6*Interval() );
cM30H=TimeFrameExpand( C1H,6*Interval() );
TimeFrameSet( 8*Interval() );
BG2H=HHV(LLV(HaL,4)+ATR(4),8); 
BR2H=LLV(HHV(HaH,4)-ATR(4),8);
C1H=HaC; 
TimeFrameRestore();
H1H = TimeFrameExpand(BG2H ,8*Interval() );
HH1H=TimeFrameExpand( BR2H,8*Interval() );
Ch1H=TimeFrameExpand( C1H,8*Interval() );
TimeFrameSet( 16*Interval() );
BG2H=HHV(LLV(HaL,4)+ATR(4),8); 
BR2H=LLV(HHV(HaH,4)-ATR(4),8); 
C1H=HaC;  
TimeFrameRestore();
H4H = TimeFrameExpand( BG2H,16*Interval() );
HH4H=TimeFrameExpand( BR2H,16*Interval() );
cH4H = TimeFrameExpand( C1H,16*Interval() ); 
RestorePriceArrays();
Comm2=("\n "+VR+ " - Phase  in  ")+"\n "+
EncodeColor(colorLightYellow)+(""+Interval(2)+":")+
WriteIf(Hac>HBG,EncodeColor(colorLime)+" UP",WriteIf(Hac < HBR,EncodeColor(colorRed)+" DN",EncodeColor(colorGrey50)+" ~~"))+
EncodeColor(colorLightYellow)+("   "+2*Interval()/60+"m:")+
WriteIf(cM5H>M5H,EncodeColor(colorLime)+"  UP",WriteIf(cM5H<MM5H,EncodeColor(colorRed)+"  DN",EncodeColor(colorGrey50)+"  ~~"))+
EncodeColor(colorLightYellow)+("   "+4*Interval()/60+"m:")+
WriteIf(cM15H>M15H,EncodeColor(colorLime)+"  UP",WriteIf(cM15H<MM15H,EncodeColor(colorRed)+"   DN",EncodeColor(colorGrey50)+"   ~~"))+
EncodeColor(colorLightYellow)+("   "+6*Interval()/60+"m:")+
WriteIf(cM30H>M30H,EncodeColor(colorLime)+"   UP",WriteIf(cM30H<MM30H,EncodeColor(colorRed)+"    DN",EncodeColor(colorGrey50)+"    ~~"))+
EncodeColor(colorLightYellow)+("  "+8*Interval()/60+"m:")+
WriteIf(Ch1H>H1H,EncodeColor(colorLime)+"      UP",WriteIf(Ch1H<HH1H,EncodeColor(colorRed)+"      DN",EncodeColor(colorGrey50)+"     ~~"))+
EncodeColor(colorLightYellow)+("  "+16*Interval()/60+"m: ")+
WriteIf(cH4H>H4H,EncodeColor(colorLime)+"       UP",WriteIf(cH4H<HH4H,EncodeColor(colorRed)+"      DN",EncodeColor(colorGrey50)+"    ~~" ));
//============

BuyPrice=ValueWhen(Buy,C);
SellPrice=ValueWhen(Sell,C);
ShortPrice=ValueWhen(Short,C);
CoverPrice=ValueWhen(Cover,C);
//=====Title================================================================================================ 
_SECTION_BEGIN("Title"); 
if( Status("action") == actionIndicator )  
( 
Title = EncodeColor(colorWhite)+ "NMA I.T v-3("+k+" - "+per+")" + " - " +  Name() + "-" + EncodeColor(colorRed)+ Interval(2) + EncodeColor(colorWhite) + 
 "  - " + Date() +"   -  "+ strWeekday +"  -  "+"\n" +EncodeColor(colorYellow) +"Op-"+O+"  "+"Hi-"+H+"  "+"Lo-"+L+"  "+ 
"Cl-"+C+"  "+ "Vol= "+ WriteVal(V)+
EncodeColor(colorTan)+ Com+
EncodeColor(colorYellow)+ Comm2);
_SECTION_END();

_SECTION_BEGIN("Background text");
C11=ParamColor("up panel",colorDarkOliveGreen );
C12=ParamColor("dn panel",colorDarkGrey );
C13=Param("fonts",20,10,30,1 );
C14=Param("left-right",2.1,1.0,5.0,0.1 );
C15=Param("up-down",12,1,20,1 );
Miny = Status("axisminy");
Maxy = Status("axismaxy");
lvb = Status("lastvisiblebar");
fvb = Status("firstvisiblebar");
pxwidth = Status("pxwidth");
pxheight = Status("pxheight");
GfxSetBkMode( 0 ); 
GfxSetOverlayMode(1);
GfxGradientRect(0,0,pxwidth, pxheight, C11, C12 ); 
GfxSelectFont("Tahoma", Status("pxheight")/C13 );
GfxSetTextAlign( 6 );
GfxTextOut( Name(), Status("pxwidth")/C14, Status("pxheight")/C15 );
GfxSelectFont("Tahoma", Status("pxheight")/C13*0.5 );
GfxTextOut( "NMA", Status("pxwidth")/C14, Status("pxheight")/C15*2.5 );
GfxSelectFont("Tahoma", Status("pxheight")/C13*0.5 );
GfxTextOut( " Rajesh Singh", Status("pxwidth")/C14, Status("pxheight")/C15*4 );
GfxSelectFont("MS Sans Serif", 10, 500, False, False, 0);
GfxTextOut(""+Vr+"---cas67", Status("pxwidth")/1.08, Status("pxheight")/C15*10.8 );
GfxSelectFont("Ariel",9, 700, False, False, 0);
GfxSetTextColor(colorYellow);
GfxTextOut(""+edc+"", Status("pxwidth")/1.15, Status("pxheight")/C15*0.3 );
//axisarea = 56; // may need adjustment if you are using non-default font for axis

// Plots a 50 period Donchian channel

pds=50;
DonchianUpper =HHV(Ref(H,-1),pds);
DonchianLower = LLV(Ref(L,-1),pds);
DonchianMiddle = (DonchianUpper+DonchianLower)/2;


Plot(DonchianUpper,"DU",colorBlue,styleLine);
Plot(DonchianMiddle,"DM",colorYellow,styleLine);
Plot(DonchianLower,"DL",colorRed,styleLine); 
_SECTION_END();

4 comments

1. Shailendra-0

HI, NICE AFL WHAT IS THE UPPER BLUE LINE IS IT FOR TARGET STUDY ?

2. shariful

Seems effective ..thanks for sharing…

3. bravotango

Arrows look good on B/S but backtest shows poor results. How do you use this system OP?

4. rajeshsingh75

Mr. shalendra this blue and red line like bolinger band..just trade below aur above yelloy line for confirmation….with arrows signal.

Leave Comment

Please login here to leave a comment.

Back