//q-AfterBrkBar.mq4, // Copyright © 2009, Arshed Qureshi arshedfx@gmail.com /* This indicator is to estimate power of trend after break high/Low */ #property copyright "Copyright © 2009, Arshed Qureshi. ArshadFX" #property indicator_chart_window extern int Pips =10; extern int Offset =1; extern int LookBack =20; // 0=Look all bars extern string D="---== Drawing Settigs ==---"; //extern bool ShowRange =0; // 0=Show Nothing, 1=Show Pips/Range extern int PaintBarWidth =3; // How fat paint bar will be ? extern color BULL =Blue; // Colour for UP bar extern color BEAR =Red; // Colour for DOWN bar int sp; // --- Init & Deinit ---------------------------------------------------------- int init() {if (LookBack==0) LookBack = Bars; sp=MarketInfo(Symbol(),MODE_SPREAD); return(0); } int deinit() { Comment(""); for(int i=LookBack; i>=0; i--) { ObjectDelete("L"+i); ObjectDelete("H"+i); } return(0); } // --- Main Function call ----------------------------------------------------- int start() { for(int x=LookBack; x>1; x--) { //GetRange=(High[x]-Low[x]); if(Digits<4) GetRange=GetRange*100; else GetRange=GetRange*10000; if (High[x-1] > High[x]+sp*Point+Offset*Point+Pips*Point) { //Alert("x : ",x,", High x : ",High[x],", High+sp : ",High[x]+sp*Point,", High+SP+Offset : ",High[x]+sp*Point+Offset*Point,", High+SP+Offset+Pips : ",High[x]+sp*Point+Offset*Point+Pips*Point); ObjectCreate("H"+x, OBJ_TREND, 0, Time[x-1],High[x]+sp*Point+Offset*Point,Time[x-1],High[x]+sp*Point+Offset*Point+Pips*Point); ObjectSet("H"+x,10,0); ObjectSet("H"+x,8,PaintBarWidth); ObjectSet("H"+x,6,BULL); } if (Low[x-1] < Low[x]-sp*Point-Offset*Point-Pips*Point) { //Alert("x : ",x,", Low x : ",Low[x],", Low-sp : ",Low[x]-sp*Point,", Low-SP-Offset : ",Low[x]-sp*Point-Offset*Point,", Low-SP-Offset-Pips : ",Low[x]-sp*Point-Offset*Point-Pips*Point); ObjectCreate("L"+x, OBJ_TREND, 0, Time[x-1],Low[x]-Offset*Point,Time[x-1],Low[x]-sp*Point-Offset*Point-Pips*Point ); ObjectSet("L"+x,10,0); ObjectSet("L"+x,8,PaintBarWidth); ObjectSet("L"+x,6,BEAR); } } // --- Display on Screen ------------------------------------------------------ Comment ("Spread : ",sp ,"\n--------------" ,"\nPips : ",Pips ,"\nOffset : ",Offset ); return(0); } // --- End of Main Function ---------------------------------------------------
Sample
Analysis
Market Information Used:
Series array that contains the highest prices of each bar
Series array that contains open time of each bar
Series array that contains the lowest prices of each bar
Indicator Curves created:
Indicators Used:
Custom Indicators Used:
Order Management characteristics:
Other Features: