Professional Documents
Culture Documents
com
_SECTION_BEGIN("Haiken-Ashi");
messageboard = ParamToggle("Message Board","Show|Hide",0);
OUTcolor = ParamColor("Outer Panel Color",colorDarkRed);
SetChartBkColor(OUTcolor); // color of outer border
//LISTING 1
function ZeroLagTEMA( array, period )
{
TMA1 = TEMA( array, period );
TMA2 = TEMA( TMA1, period );
Diff = TMA1 - TMA2;
return TMA1 + Diff ;
}
haClose = ( haClose + haOpen + haHigh + haLow )/4;
period = Param("Avg. TEMA period", 55, 1, 100 );
ZLHa = ZeroLagTEMA( haClose, period );
ZLTyp = ZeroLagTEMA( Avg, period );
//Plot( ZLHa, "ZLTema(Ha,"+period+")", colorRed );
//Plot( ZLTyp, "ZLTema(Typ,"+period+")", colorGreen );
TMBuy = Cross( ZLTyp, ZLHa );
TMSell = Cross( ZLHa, ZLTyp );
TMBuy1= ZLTyp> ZLHa ;
TMSell1=ZLHa> ZLTyp ;
_SECTION_END();
_SECTION_BEGIN("Haiken");
Prd1=Param("ATR Period",5,1,20,1);
Prd2=Param("Look Back",5,1,20,1);
green = HHV(LLV(L,Prd1)+ATR(Prd1),Prd2);
red = LLV(HHV(H,Prd1)-ATR(Prd1),Prd2);
rc= C > EMA (C,50) AND C < EMA(C,200) AND EMA(C,50) < EMA(C,200);
ac= C > EMA (C,50) AND C > EMA(C,200) AND EMA(C,50) < EMA(C,200);
bl= C > EMA (C,50) AND C > EMA(C,200) AND EMA(C,50) > EMA(C,200);
wr= C < EMA (C,50) AND C > EMA(C,200) AND EMA(C,50) > EMA(C,200);
ds= C < EMA (C,50) AND C < EMA(C,200) AND EMA(C,50) > EMA(C,200);
br= C < EMA (C,50) AND C < EMA(C,200) AND EMA(C,50) < EMA(C,200);
//------------------------
//Wad: Larry Williams Acc/Distribution Status
TRH = IIf(Ref(C, -1) > H, Ref(C, -1), H);
TRL = IIf(Ref(C, -1) < L, Ref(C, -1), L);
ad = IIf(C > Ref(C, -1), C - TRL, IIf(C < Ref(C, -1), C - TRH, 0));
WAD = Cum(ad);
wu = wad > Ref(wad,-1);
wd = wad < Ref(wad,-1);
//wad_status= WriteIf(wu, "Rising", WriteIf(wd, "Falling", "Neutral"));
Var4 =(Low+High+2*Close)/4;
OP = EMA(Var4,a);
res1 = HHV(OP,n);
res2 =HHV(OP,m);
sup2 =LLV(OP,m);
sup1 =LLV(OP,n);
Linecolor = IIf(Op==sup1,colorCustom12,IIf(Op==res1,10,7));
_SECTION_BEGIN("Rays1");
line=ParamToggle("Line","No|Yes",1);
if(line)
{
Pp1=Param("Ray_Period1",3,1,20,1);
Pp2=Param("ATR_Period1",4,1,20,1);
Cal=HHV(LLV(HaHigh,Pp1)-ATR(Pp2),5);
_SECTION_END();
_SECTION_BEGIN("OsSetting");
if(Ovos)
{
PlotShapes (IIf(Oversold, shapeHollowSmallCircle, shapeNone) ,38, layer = 0,
yposition = haLow, offset = -8 );
PlotShapes (IIf(Overbought, shapeHollowSmallCircle, shapeNone) ,colorBrown, layer =
0, yposition = haHigh, offset = 7 );
}
_SECTION_END();
_SECTION_BEGIN("TSKPPIVOT");
CHiPr = 0;
CLoPr = 9999999;
blsLong = 0;
PrevCOBar = 0;
NumBars = 0;
PrePP = 0;
PrevLowVal = 9999999;
BuySig = 0;
blsShort = 0;
PrevHiVal = 0;
blsNewCO = 0;
BarDif = 0;
KPA900Val = MA(Close,15);
KPAutoStopVal =IIf(High,Low,Close);
sctotal = 0;
// -- Create 0-initialized arrays the size of barcount
aHPivs = haHigh - haHigh;
aLPivs = haLow - haLow;
aHiVal = haHigh - haHigh;
aLoVal = haLow - haLow;
for (curBar=0; curBar < BarCount-1; curBar++)
{
if ( curBar == 0 )
{
CHiPr = haHigh[curBar];
CHiBar = curBar;
CLoPr = haLow[curBar];
CLoBar = curBar;
blsLong = 0;
blsShort = 0;
blsNewCO = 0;
PrePP = 0;
PrevCOBar = 0;
PrevHiVal = haHigh[curBar];
PrevLowVal = haLow[curBar];
BuySig = 0;
SellSig = 0;
blsLL = 0;
}
_SECTION_END();
_SECTION_BEGIN("TSKPMoMo");
blsLong = 0;
tskp_triggerline=MA(C,25);
ahigh=IIf(Low,Close,Volume);
bhigh=IIf(Low,Close,Volume);
//E_TSKPFAST3=IIf(MA(C,5));
tskp_fast2val1=MA(C,15);
KPStopLine = IIf(High,Low,Close);
// tskp_upsell, tskp_triggerline, tskp_triggerlinevma
sw =IIf(Open,High,ahigh);
KPTriggerLine = tskp_triggerline;
KPFast3Val = IIf((IIf(Open,High,bhigh)> 0),1, -1);
//tskp_fast2val1, tskp_fast2val2
dummy =IIf(Open,High,bhigh);
KPFast2Val = IIf ((tskp_fast2val1 > 0),1,-1);
Ctmpl = IIf(Open,High,ahigh);
sctotal = 0;
// tskp_mediumma,tskp_mediumup,tskp_mediumdown
dummy = MA(Close,5);
tskp_mediumup = MA(Close,15);
tskp_mediumdown= MA(Close,10);
tskp_mediumma=MA(Close,45);
KPMediumUP = tskp_mediumup;
KPMediumDwn = tskp_mediumdown;
KPMediumMA = tskp_mediumma;
_SECTION_END();
dif=Ref(High,0)-Ref(Low,0);
dif1=Ref(High,-1)-Ref(Low,-1);
dif2=Ref(High,-2)-Ref(Low,-2);
dif3=Ref(High,-3)-Ref(Low,-3);
dif4=Ref(High,-4)-Ref(Low,-4);
dif5=Ref(High,-5)-Ref(Low,-5);
dif6=Ref(High,-6)-Ref(Low,-6);
dif7=Ref(High,-7)-Ref(Low,-7);
dif8=Ref(High,-8)-Ref(Low,-8);
dif9=Ref(High,-9)-Ref(Low,-9);
dif10=Ref(High,-10)-Ref(Low,-10);
dif11=Ref(High,-11)-Ref(Low,-11);
dif12=Ref(High,-12)-Ref(Low,-12);
dif13=Ref(High,-13)-Ref(Low,-13);
dif14=Ref(High,-14)-Ref(Low,-14);
dif15=Ref(High,-15)-Ref(Low,-15);
dif16=Ref(High,-16)-Ref(Low,-16);
dif17=Ref(High,-17)-Ref(Low,-17);
dif18=Ref(High,-18)-Ref(Low,-18);
dif19=Ref(High,-19)-Ref(Low,-19);
dif20=Ref(High,-20)-Ref(Low,-20);
dif21=Ref(High,-21)-Ref(Low,-21);
Sumdif=(dif+dif1+dif2+dif3+dif4+dif5+dif6+dif7+dif8+dif9+dif10+dif11+dif12+dif13+di
f14+dif15+dif16+dif17+dif18+dif19+dif20+dif21)/22;
mp = Param("Multiplier",2,0.25,5,0.25);
Sumdifml=(Sumdif*1);
Sumdifml2=(Sumdif*1.5);
Sumdifml3=(Sumdif*mp);
Betastops=HHV(C,22) - Sumdifml;
Betastops2=HHV(C,22) - Sumdifml2;
Betastops3=HHV(C,22) - Sumdifml3;
//---------------------------------------------------------------------------------
-------
// Find Short Term Reversals - Closing Price, Hook, Island, Key, Open-Close
// and Pivot Point Reversals using automatic analysis
//-----------------------------------------------------------------------------
_SECTION_BEGIN("VSA by Mr.Karthik");
Pp1=Param("NumberOfDays",30,1,200,1);
Pp2=Param("VolOfDays",15,1,200,1);
numDays = Pp1;
dwWideSpread = 1.8;
dwNarrowSpread = 0.8;
dwSpreadMiddle = 0.5;
dwHighClose = 0.7;
dwLowClose = 0.3;
volNumDays = Pp2;
dwUltraHighVol = 2;
dwVeryHighVol = 1.75; // was 1.8
dwHighVol = 1.75; // was 1.8
dwmoderateVol = 1.10; // was 1.8
dwLowVol = 0.75; // was 0.8
///////////////////////////////////////////////////////////////////////////////////
/
//
// Classify each bar...
//
///////////////////////////////////////////////////////////////////////////////////
/
///////////////////////////////////////////////////////////////////////////////////
/
//
// direction and title
//
///////////////////////////////////////////////////////////////////////////////////
/
///////////////////////////////////////////////////////////////////////////////////
/
//
// Basic patterns...
//
///////////////////////////////////////////////////////////////////////////////////
/
upThrustBar = downClose AND H > Ref(H,-1) AND (C == L) AND downClose AND (NOT
narrowRange);
noDemandBar = narrowRange AND LowVolume AND upBar AND (NOT upClose);
//noDemandBar = narrowRange AND LowVolume AND upBar AND (V < Ref(V,-1)) AND (V <
Ref(V,-2));
noSupplyBar = narrowRange AND LowVolume AND downBar AND (V < Ref(V,-1)) AND (V <
Ref(V,-2));
absorption = Ref(downbar, -1) AND Ref(highVolume, -1) AND upBar;
support = Ref(downBar,-1) AND (NOT Ref(downClose,-1)) AND Ref(highVolume,-1) AND
upBar;
stoppingVolume = Ref(downBar,-1) AND Ref(highVolume,-1) AND C > testCloseMiddle AND
(NOT downBar);
bullishsign=moderateVol+UpThrustBar;//OR moderateVol+upBar;
//rallyEnd = (Ref(highVolume,-1) AND Ref(upBar,-1) AND wideRange AND downBar) OR
// (narrowRange AND highVolume AND H > Ref(HHV(H, 250), -1));
///////////////////////////////////////////////////////////////////////////////////
/
//
// Strength and Weakness
//
///////////////////////////////////////////////////////////////////////////////////
/
_SECTION_END();
_SECTION_BEGIN("Resistance");
supres=ParamToggle("Sup_Res","No|Yes",1);
if(supres)
{
Prd1=Param("Res_Period1",2,0,200,1);
_SECTION_END();
_SECTION_BEGIN("Support");
//SP=L > Ref(L,-1) AND Ref(L,1) < L;//Peak
Prd2=Param("Sup_Period1",2,0,200,1);
_SECTION_END();
_SECTION_BEGIN("Volume Price Analysis by Mr.Karthik ");
SetChartOptions(0,chartShowArrows|chartShowDates);
//=================================================================================
======
//////////////////////////////////////////////////////////////////////////////
//ROC(V,1);
//IIf(ROC(V,1) > 0, colorGreen, colorRed);
Vol=(ROC(V,1));
CP=(ROC(C,1));
_SECTION_BEGIN("Bull vs Bear Volume");
C1 = Ref(C, -1);
uc = C > C1; dc = C <= C1;
ud = C > O; dd = C <= O;
/********************************************************
Convergence Rise/Fall Shadows:
for(i=1;i<BarCount;i++)
{
if( CondR[i] )
{
R[i] = 1;
}
else
{
if( CondF[i] )
{
R[i] = 0;
}
else
{
R[i] = R[i-1];
}
}
}
return R;
}
PrD = C;
PrL = H/2+L/2;
PrdD = PrdL = PrdM = Param("Prd",12,2,40,1);
permax = Max(prdd,prdl);
Confirm = MA(C,prdm);
for(i=1;i<BarCount;i++)
{
if( dr[i-1] && df[i] )
{
B[i] = 1;
}
else
{
if( df[i-1] && dr[i] )
{
B[i] = 1;
}
else
{
B[i] = B[i-1] + 1;
}
}
}
return B;
}
Bs = DirBar( Rs, Fs );
Direction = ROC(Confirm,1) > 0 AND ROC(Confirm,5) > 0;
Downward = ROC(Confirm,1) < 0 AND ROC(Confirm,5) < 0;
_SECTION_END();
Chg=Ref(C,-1);
Cg = Foreign("00DSEGEN", "C");
Cgo= Ref(Cg,-1);
//Longterm Bullish or Bearish
Bullg = Cg > WMA(Cg,200);
Bearg= Cg <WMA(Cg,200);
xChange1=Cg - Ref(Cg,-1);
Change1 = StrFormat("%1.2f% ",xChange1);
barche1= xChange1>=0;
Comche1= xChange1<0;
xperchange1 = xChange1/100;
perchange1 = StrFormat("%1.2f% ",xperchange1);
positivechange1 = xperchange1>0;
negativechange1 = xperchange1<0;
Prd1=Param("Weekly_Period1",3,1,200,1);
Prd2=Param("Weekly_Period2",5,1,200,1);
TimeFrameSet (inWeekly);
function T3(price,periods)
{
s = 0.84;
e1=EMA(price,periods);
e2=EMA(e1,Periods);
e3=EMA(e2,Periods);
e4=EMA(e3,Periods);
e5=EMA(e4,Periods);
e6=EMA(e5,Periods);
c1=-s*s*s;
c2=3*s*s+3*s*s*s;
c3=-6*s*s-3*s-3*s*s*s;
c4=1+3*s+s*s*s+3*s*s;
Ti3=c1*e6+c2*e5+c3*e4+c4*e3;
return ti3;
}
TM = T3 ( Close , Prd1 ) ;
TM2 = T3 ( Close , Prd2 ) ;
UTM = IIf(Close>TM AND Close<TM2,8,
IIf(Close>TM AND Close>TM2,5,
IIf(Close<TM AND Close>TM2,13,
IIf(Close<TM AND Close<TM2,4,2))));
//Pivot Cal
S1 = (Pp * 2) - High;
S2 = (Pp - High) + Low;
S3 = S1 - (High-Low);
mBull = C >WMA(C,50);
mBear= C <WMA(C,50);
sBull = C >WMA(C,15);
sBear= C <WMA(C,15);
_SECTION_END();
/*
*/
//Price Volume Breakout: close greater than last close and volume at least twice as
much 50-day MA
HIV = C > Ref (C,-1) AND V > (MA(V,15)*2);
LIV = C < Ref (C,-1) AND V < (MA(V,15)*2);
//------------------------------------------------------------
//Stochastics Part
//StochBuy = Cross(StochK(9,3), StochD(9,3,3));
//StochSell = Cross (StochD(9,3,3), StochK(9,3));
//StBuy=StochK(9,3)>StochD(9,3,3);
//StSell=StochK(9,3)<StochD(9,3,3);
//Stochastics Part
StochKval = StochK(10,5);
StochDval = StochD(10,5,5);
StBuy=StochK(10,5)>StochD(10,5,5);
StSell=StochK(10,5)<StochD(10,5,5);
_SECTION_END();
_SECTION_BEGIN("Mabiuts-Mr.Karthik");
mabBuy=EMA(C,13)>EMA(EMA(C,13),9) AND Cross (C,Peak(C,5,1));
mabSell=Cross (EMA(EMA(C,13),9),EMA(C,13));
mabBuy1= EMA(C,13)>EMA(EMA(C,13),9) AND C>Peak(C,2,1);
mabSell1 =EMA(C,13)>EMA(EMA(C,13),9) AND C<Peak(C,2,1);
_SECTION_END();
_SECTION_BEGIN("JSB_Pic_DMX_3");
SetBarsRequired(100000, 100000);
//_SECTION_BEGIN("MA-T3 Setting");
// Probable MA-T3 Cross-Oracle
p=Param("Cross Period 1",4,1,20,1); //4
MAp=T3(C,p);
k=Param("Cross Period 2",5,1,20,1);//6
MAk=T3(C,k);
y=p*T3(C,p)-(p-1)*Ref(T3(C,p-1),-1);
tClose=(p*(k-1)*T3(C,k-1)-k*(p-1)*T3(C,p-1))/(k-p);
DescCrossPrediction=Cross(tClose,C);
AscCrossPrediction=Cross(C,tClose);
ExpectMAcross=DescCrossPrediction OR AscCrossPrediction;
Confirmed=Cross(MAk,MAp) OR Cross(MAp,MAk);
UR=2*Highest(ROC(C,1));LR=2*Lowest(ROC(C,1));
Ucoeff=1+UR/100;Lcoeff=1+LR/100;
Filter=tClose<Lcoeff*C OR tClose>Ucoeff*C;
AddColumn(MAp,"MAp");
AddColumn(MAk,"MAk");
//Plot(C,"",7*Filter+1,64); //No. '64' designates price chart as candle
//Plot(MAp,"",7,1); //Red Line - The No. '4' designates the red color & No. '1'
//Plot(MAk,"",2,1); //Green Line - - The No. '4' designates the red color & No. '1'
bars=BarsSince(Cross(MAp,MAk) OR Cross(MAk,MAp));
expect=NOT(Filter);
orBuy=AscCrossPrediction;
orSell=DescCrossPrediction;
orBuy1=(C>tClose);
orSell1=(tClose>C);
_SECTION_END();
_SECTION_BEGIN("Breakout Setting");
Buyperiods=Param("Breakout periods",5,1,100,1,1);
BuyBreakout= C>Ref(HHV(H,Buyperiods),-1);
Hi=Param("High_Period",7,1,50,1);
Lo=Param("Low_Period",7,1,50,1);
A1=ExRemSpan(Ref(High,-2)==HHV(High,Hi),3);
A2=ExRemSpan(Ref(Low,-2)==LLV(Low,Lo),3);
A3=Cross(A1,0.9);
A4=Cross(A2,0.9);
TOP=Ref(haHigh,-BarsSince(A3));
YY1=TOP;
bot=Ref(haLow,-BarsSince(A4));
XX1=bot;
/////////////////
_SECTION_BEGIN("Haiken");
Prd1=Param("ATR Period",4,1,20,1);
Prd2=Param("Look Back",7,1,20,1);
green = HHV(LLV(L,Prd1)+ATR(Prd1),Prd2);
red = LLV(HHV(H,Prd1)-ATR(Prd1),Prd2);
m1=MACD(r1,r2);
s1=Signal(r1,r2,r3);
mycolor=IIf(m1<0 AND m1>s1, ColorRGB(230,230,0),IIf(m1>0 AND
m1>s1,ColorRGB(0,0,100),IIf(m1>0 AND m1<s1,colorOrange,colorDarkRed)));
if(Show_color)
{
ColorHighliter = myColor;
SetBarFillColor( ColorHighliter );
}
//////////
m1=MACD(r1,r2);
s1=Signal(r1,r2,r3);
mycolor=IIf(m1<0 AND m1>s1, ColorRGB(230,230,0),IIf(m1>0 AND
m1>s1,ColorRGB(0,0,100),IIf(m1>0 AND m1<s1,colorOrange,colorDarkRed)));
if(Show_color)
{
ColorHighliter = mycolor;
SetBarFillColor( ColorHighliter );
}
_SECTION_END();
_SECTION_BEGIN("Unnamed 1");
threshold = 5;
uptrend = StochK(39,3) > StochD(39,3,3);
downtrend =StochK(39,3) < StochD(39,3,3);
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
SetChartOptions(0, chartShowDates);
//Plot(C,"\nC",colorWhite,64);
PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorGreen,0,L,-15);
//PlotShapes(IIf(Buy,shapeHollowUpArrow,shapeNone),c olorWhite,0,L,-15);
PlotShapes(IIf(Buy,shapeHollowSmallCircle,shapeNone),colorWhite,0,BuyPrice,0);
PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorRed,0,H,-15);
//PlotShapes(IIf(Sell,shapeHollowDownArrow,shapeNone ),colorWhite,0,H,-15);
PlotShapes(IIf(Sell,shapeHollowSmallCircle,shapeNone),colorWhite,0,SellPrice,0);
_SECTION_END();
_SECTION_BEGIN("Pivot");
nBars = Param("Number of bars", 12, 3, 40);
LP=Param("LookBack Period",150,1,500,1);
bShowTCZ = Param("Show TCZ", 0, 0, 1);
nExploreBarIdx = 0;
nExploreDate = 0;
nCurDateNum = 0;
DN = DateNum();
DT = DateTime();
bTCZLong = False;
bTCZShort = False;
nAnchorPivIdx = 0;
ADX8 = ADX(8);
if(Status("action")==1) {
bDraw = True;
bUseLastVis = 1;
} else {
bDraw = False;
bUseLastVis = False;
bTrace = 1;
nExploreDate = Status("rangetodate");
for (i=LastValue(BarIndex());i>=0;i--) {
nCurDateNum = DN[i];
if (nCurDateNum == nExploreDate) {
nExploreBarIdx = i;
}
}
}
if (bDraw) {
}
aHPivs = HaHigh - HaHigh;
aLPivs = HaLow - HaLow;
aHPivHighs = HaHigh - HaHigh;
aLPivLows = HaLow - HaLow;
aHPivIdxs = HaHigh - HaHigh;
aLPivIdxs = HaLow - HaLow;
aAddedHPivs = HaHigh - HaHigh;
aAddedLPivs = HaLow - HaLow;
aLegVol = HaHigh - HaHigh;
aRetrcVol = HaHigh - HaHigh;
nHPivs = 0;
nLPivs = 0;
lastHPIdx = 0;
lastLPIdx = 0;
lastHPH = 0;
lastLPL = 0;
curPivBarIdx = 0;
aHHVBars = HHVBars(HaHigh, nBars);
aLLVBars = LLVBars(HaLow, nBars);
aHHV = HHV(HaHigh, nBars);
aLLV = LLV(HaLow, nBars);
nLastVisBar = LastValue(
Highest(IIf(Status("barvisible"), BarIndex(), 0)));
curBar = IIf(nlastVisBar > 0 AND bUseLastVis, nlastVisBar,
IIf(Status("action")==4 AND nExploreBarIdx > 0, nExploreBarIdx,
LastValue(BarIndex())));
curTrend = "";
if (aLLVBars[curBar] < aHHVBars[curBar])
curTrend = "D";
else
curTrend = "U";
if (curBar >= LP) {
for (i=0; i<LP; i++) {
curBar = IIf(nlastVisBar > 0 AND bUseLastVis,
nlastVisBar-i,
IIf(Status("action")==4 AND nExploreBarIdx > 0,
nExploreBarIdx-i,
LastValue(BarIndex())-i));
if (aLLVBars[curBar] < aHHVBars[curBar]) {
if (curTrend == "U") {
curTrend = "D";
curPivBarIdx = curBar - aLLVBars[curBar];
aLPivs[curPivBarIdx] = 1;
aLPivLows[nLPivs] = HaLow[curPivBarIdx];
aLPivIdxs[nLPivs] = curPivBarIdx;
nLPivs++;
}
} else {
if (curTrend == "D") {
curTrend = "U";
curPivBarIdx = curBar - aHHVBars[curBar];
aHPivs[curPivBarIdx] = 1;
aHPivHighs[nHPivs] = HaHigh[curPivBarIdx];
aHPivIdxs[nHPivs] = curPivBarIdx;
nHPivs++;
}
}
}
}
curBar =
IIf(nlastVisBar > 0 AND bUseLastVis,
nlastVisBar,
IIf(Status("action")==4 AND nExploreBarIdx > 0,
nExploreBarIdx,
LastValue(BarIndex()))
);
if (nHPivs >= 2 AND nLPivs >= 2) {
lastLPIdx = aLPivIdxs[0];
lastLPL = aLPivLows[0];
lastHPIdx = aHPivIdxs[0];
lastHPH = aHPivHighs[0];
nLastHOrLPivIdx = Max(lastLPIdx, lastHPIdx);
nAddPivsRng = curBar - nLastHOrLPivIdx;
aLLVAfterLastPiv = LLV(HaLow, nAddPivsRng);
nLLVAfterLastPiv = aLLVAfterLastPiv[curBar];
aLLVIdxAfterLastPiv = LLVBars(HaLow, nAddPivsRng);
nLLVIdxAfterLastPiv = curBar - aLLVIdxAfterLastPiv[curBar];
aHHVAfterLastPiv = HHV(HaHigh, nAddPivsRng);
nHHVAfterLastPiv = aHHVAfterLastPiv[curBar];
aHHVIdxAfterLastPiv = HHVBars(HaHigh, nAddPivsRng);
nHHVIdxAfterLastPiv = curBar - aHHVIdxAfterLastPiv[curBar];
if (lastHPIdx > lastLPIdx) {
/* ****************************************************************
Still finding missed pivot(s). Here, the last piv is a low piv.
**************************************************************** */
} else {
/* ****************************************
// -- Done with finding pivots
***************************************** */
if (bDraw) {
/* ****************************************
// -- Done with discovering and plotting pivots
***************************************** */
risk = 0;
profInc = 0;
nLeg0Pts = 0;
nLeg0Bars = 0;
nLeg0Vol = 0;
nLeg1Pts = 0;
nLeg1Bars = 0;
nLeg1Vol = 0;
nLegBarsDiff = 0;
nRtrc0Pts = 0;
nRtrc0Bars = 0;
nRtrc0Vol = 0;
nRtrc1Pts = 0;
nRtrc1Bars = 0;
nRtrc1Vol = 0;
minRtrc = 0;
maxRtrc = 0;
minLine = 0;
maxLine = 0;
triggerLine = 0;
firstProfitLine = 0;
triggerInc = 0;
triggerPrc = 0;
firstProfitPrc = 0;
retrcPrc = 0;
retrcBar = 0;
retrcBarIdx = 0;
retrcRng = 0;
aRetrcPrc = HaHigh-HaHigh;
aRetrcPrcBars = HaHigh-HaHigh;
aRetrcClose = HaClose;
retrcClose = 0;
tcz500 =
(aHPivHighs[0] -
(.5 * (aHPivHighs[0] - aLPivLows[1])));
tcz618 =
(aHPivHighs[0] -
(.618 * (aHPivHighs[0] - aLPivLows[1])));
tcz786 =
(aHPivHighs[0] -
(.786 * (aHPivHighs[0] - aLPivLows[0])));
retrcPrc = aRetrcPrc[curBar];
retrcBarIdx = curBar - aRetrcPrcBars[curBar];
retrcClose = aRetrcClose[retrcBarIdx];
// -- bTCZLong setup?
bTCZLong = (
tcz500 =
(aHPivHighs[1] -
(.5 * (aHPivHighs[1] - aLPivLows[0])));
tcz618 =
(aHPivHighs[0] -
(.618 * (aHPivHighs[1] - aLPivLows[0])));
tcz786 =
(aHPivHighs[0] -
(.786 * (aHPivHighs[0] - aLPivLows[0])));
retrcRng = curBar - aLPivIdxs[0];
aRetrcPrc = HHV(HaHigh, retrcRng);
retrcPrc = aRetrcPrc[curBar];
aRetrcPrcBars = HHVBars(HaHigh, retrcRng);
retrcBarIdx = curBar - aRetrcPrcBars[curBar];
retrcClose = aRetrcClose[retrcBarIdx];
bTCZShort = (
// -- Are retracement levels arranged in
// tcz order?
if (bShowTCZ) {
Plot(
LineArray( IIf(bTCZLong, aHPivIdxs[0], aLPivIdxs[0]),
tcz500, curBar, tcz500 , 0),
"tcz500", colorPaleBlue, styleLine);
Plot(
LineArray( IIf(bTCZLong, aHPivIdxs[0], aLPivIdxs[0]),
tcz618, curBar, tcz618, 0),
"tcz618", colorPaleBlue, styleLine);
Plot(
LineArray( IIf(bTCZLong, aHPivIdxs[0], aLPivIdxs[0]),
tcz786, curBar, tcz786, 0),
"tcz786", colorTurquoise, styleLine);
}
// -- if (bShowTCZ)
}
_SECTION_END();
W52_High=WriteVal(HHV(H,260),1.2);
W52_Low=WriteVal(LLV(L,260),1.2);
_SECTION_BEGIN("Fundamental data");
declara=GetFnData("LastSplitDate" );
declara1=GetFnData("DividendPayDate" ); // yahoo.format
//=================================================================================
=========
utbar=wrb AND dcls AND tls>0 ;
utcond1=Ref(utbar,-1) AND dnbar ;
utcond2=Ref(utbar,-1) AND dnbar AND V>Ref(V,-1);
utcond3=utbar AND V> 2*Vrg;
trbar=Ref(V,-1)>Vrg AND Ref(upbar,-1) AND Ref(wrb,-1) AND dnbar AND dcls AND wrb
AND tll>0 AND H==HHV(H,10);
Hutbar=Ref(upbar,-1) AND Ref(V,-1)>1.5*Vrg AND dnbar AND dcls AND NOT wrb AND NOT
utbar;
Hutcond=Ref(Hutbar,-1) AND dnbar AND dcls AND NOT utbar;
tcbar=Ref(upbar,-1) AND H==HHV(H,5)AND dnbar AND (dcls OR mcls) AND V>vrg AND NOT
wrb AND NOT Hutbar ;
Scond1=(utcond1 OR utcond2 OR utcond3) ;
Scond2=Ref(scond1,-1)==0;
scond=scond1 AND scond2;
stdn0= tll<0 AND V>Ref(V,-1) AND Ref(dnbar,-1) AND upbar AND (ucls OR mcls) AND
tls<0 AND tlm<0;
stdn= V>Ref(V,-1) AND Ref(dnbar,-1) AND upbar AND (ucls OR mcls) AND tls<0 AND
tlm<0;
stdn1= tll<0 AND V>(vrg*1.5) AND Ref(dnbar,-1) AND upbar AND (ucls OR mcls)AND
tls<0 AND tlm<0;
stdn2=tls<0 AND Ref(V,-1)<Vrg AND upbar AND vhcls AND V>Vrg;
bycond1= stdn OR stdn1;
bycond= upbar AND Ref(bycond1,-1);
stvol= L==LLV(L,5) AND (ucls OR mcls) AND V>1.5*Vrg AND tll<0;
ndbar=upbar AND nrb AND Vl AND dcls ;
nsbar=dnbar AND nrb AND Vl AND dcls ;
nbbar= C>Ref(C,-1) AND Vl AND nrb AND x1<2;
nbbar= IIf(C>Ref(C,-1) AND V<Ref(V,-1) AND V<Ref(V,-2) AND x1<1.1,1,0);
lvtbar= vl AND L<Ref(L,-1) AND ucls;
lvtbar1= V<Vrg AND L<Ref(L,-1) AND ucls AND tll>0 AND tlm>0 AND wrb;
lvtbar2= Ref(Lvtbar,-1) AND upbar AND ucls;
dbar= V>2*Vrg AND dcls AND upbar AND tls>0 AND tlm>0 AND NOT Scond1 AND NOT utbar;
eftup=H>Ref(H,-1) AND L>Ref(L,-1) AND C>Ref(C,-1) AND C>=((H-L)*0.7+L) AND rg>arg
AND V>Ref(V,-1);
eftupfl=Ref(eftup,-1) AND (utbar OR utcond1 OR utcond2 OR utcond3);
eftdn=H<Ref(H,-1) AND L<Ref(L,-1) AND C<Ref(C,-1) AND C<=((H-L)*0.25+L) AND rg>arg
AND V>Ref(V,-1);
_SECTION_END();
_SECTION_BEGIN("Commentary");
Vpc= utbar OR utcond1 OR utcond2 OR utcond3 OR stdn0 OR stdn1 OR stdn2 OR stdn OR
lvtbar1 OR Lvtbar OR Lvtbar2 OR Hutbar OR Hutcond OR ndbar OR stvol OR tcbar;
WriteIf(nsbar,"No Supply. A no supply bar indicates supply has been removed and the
Smart money can markup the price. It is better to wait for confirmation","")+
WriteIf(stvol,"Stopping Volume. This will be an downbar during a bearish period
closing towards the Top accompanied by High volume.
A stopping Volume normally indicates that smart money is absorbing the supply which
is a Indication that they are Bullishon the MArket.
Hence we Can expect a reversal in the down trend. ","")+
WriteIf(ndbar, "No Demand
Brief Description:
Any up bar which closes in the middle OR Low, especially if the Volume has fallen
off,
is a potential sign of weakness.
+"\n"+EncodeColor(colorPink)+"-----------------------------------------"
+"\n"+EncodeColor(colorOrange)+""
+"\n"+EncodeColor(colorLightOrange)+""
+"\n"+EncodeColor(colorPink)+"-----------------------------------------"
+"\n"+EncodeColor(colorWhite)+"G.Index: "+
WriteIf(Cg>Cgo,EncodeColor(08),EncodeColor(04))
+WriteVal(Cg,format=1.2)+WriteIf(positivechange1, EncodeColor(colorBrightGreen),"")
+WriteIf(negativechange1,EncodeColor(colorRed), "")+"
( "+WriteIf(barche1,"\\c08"+Change1,"")+WriteIf(barche1,"\\c08 ","")
+WriteIf(Comche1,"\\c04"+Change1,"")+ WriteIf(Comche1,"\\c04 ","")+""+") "
+"\n"+EncodeColor(colorPink)+"----------------------------------------- "
//+"\n"+EncodeColor(25)+"WeeklyTrend:" + WriteIf(up,EncodeColor(colorBrightGreen)
+"UP",WriteIf(down,EncodeColor(colorRed)
+"Down",WriteIf(flat,EncodeColor(colorYellow)+"Flat","")))
+WriteIf(Rs,EncodeColor(colorBrightGreen)+"UP",WriteIf(Fs,EncodeColor(colorRed)
+"Down","Neutral"))
+"\n"+EncodeColor(colorPink)+"---------------------------------------- "
+"\n"+EncodeColor(47)+"Signal(IBuy): " + WriteIf(Ibuy,EncodeColor(colorBrightGreen)
+"BuyWarning",WriteIf(Isell,EncodeColor(colorRed)
+"SellWarning",WriteIf(BlRSI,EncodeColor(colorBrightGreen)
+"BullishZone",WriteIf(BrRSI,EncodeColor(colorRed)+"BearishZone","Neutral"))))
+"\n"+EncodeColor(47)+"Signal(T3) : " +
WriteIf(TBuy,EncodeColor(colorBrightGreen)
+"Buy",WriteIf(TSell,EncodeColor(colorRed)
+"Sell",WriteIf(T33,EncodeColor(colorBrightGreen)
+"Bullish",WriteIf(T333,EncodeColor(colorRed)+"Bearish","Neutral"))))
+"\n"+EncodeColor(47)+"Signal(ZLW) : " +
WriteIf(ZBuy,EncodeColor(colorBrightGreen)
+"Buy",WriteIf(ZSell,EncodeColor(colorRed)
+"Sell",WriteIf(ZBuy1,EncodeColor(colorBrightGreen)
+"Bullish",WriteIf(ZSell1,EncodeColor(colorRed)+"Bearish","Neutral"))))
+"\n"+EncodeColor(47)+"Signal(Mab) : " +
WriteIf(mabBuy,EncodeColor(colorBrightGreen)
+"Buy",WriteIf(mabSell,EncodeColor(colorRed)
+"Sell",WriteIf(mabBuy1,EncodeColor(colorBrightGreen)
+"Bullish",WriteIf(mabSell1,EncodeColor(47)+"Neutral",EncodeColor(colorRed)
+"Bearish"))))
+"\n"+EncodeColor(47)+"Signal(TMA) : " +
WriteIf(TMBuy,EncodeColor(colorBrightGreen)
+"Buy",WriteIf(TMSell,EncodeColor(colorRed)
+"Sell",WriteIf(TMBuy1,EncodeColor(colorBrightGreen)
+"Bullish",WriteIf(TMSell1,EncodeColor(colorRed)+"Bearish","Neutral"))))
+"\n"+EncodeColor(47)+"Signal(T3-RSI) : " +
WriteIf(TillsonBuy,EncodeColor(colorBrightGreen)
+"Buy",WriteIf(TillsonSell,EncodeColor(colorRed)+"Sell",
WriteIf(TB,EncodeColor(colorBrightGreen)+"Bullish",WriteIf(TS,EncodeColor(colorRed)
+"Bearish","Neutral"))))
+"\n"+EncodeColor(47)+"Signal(ADX) : " +
WriteIf(adxBuy,EncodeColor(colorBrightGreen)
+"Buy",WriteIf(adxSell,EncodeColor(colorRed)
+"Sell",WriteIf(adxBuy1,EncodeColor(colorBrightGreen)
+"Bullish",WriteIf(adxSell1,EncodeColor(colorRed)+"Bearish","Neutral"))))
+"\n"+EncodeColor(47)+"Signal(MACD) : " + WriteIf(MB,EncodeColor(colorBrightGreen)
+"Buy",WriteIf(MS,EncodeColor(colorRed)
+"Sell",WriteIf(MB1,EncodeColor(colorBrightGreen)
+"Bullish",WriteIf(MS1,EncodeColor(colorRed)+"Bearish","Neutral"))))
+"\n"+EncodeColor(47)+"Signal(Stoch) : " +
WriteIf(StochBuy,EncodeColor(colorBrightGreen)
+"Buy",WriteIf(StochSell,EncodeColor(colorRed)
+"Sell",WriteIf(StBuy,EncodeColor(colorBrightGreen)
+"Bullish",WriteIf(StSell,EncodeColor(colorRed)+"Bearish","Neutral"))))
+"\n"+EncodeColor(47)+"Signal(TM) : "+ WriteIf(orBuy,EncodeColor(colorBrightGreen)
+"Buy",WriteIf(orSell,EncodeColor(colorRed)
+"Sell",WriteIf(orBuy1,EncodeColor(colorBrightGreen)
+"Bullish",WriteIf(orSell1,EncodeColor(colorRed)+"Bearish","Neutral"))))
//+"\n"+EncodeColor(47)+"Signal(Drava) : " +
WriteIf(Buyrule,EncodeColor(colorBrightGreen)
+"Buy",WriteIf(Sellrule,EncodeColor(colorRed)
+"Sell",WriteIf(Buyrule1,EncodeColor(colorBrightGreen)
+"Bullish",WriteIf(Sellrule1,EncodeColor(colorRed)+"Bearish","Neutral"))))
+"\n"+EncodeColor(47)+"Signal(P5/15):" +
WriteIf(Buybreakout,EncodeColor(colorBrightGreen)
+"BreakOut1",WriteIf(Buybreakout2>Buybreakout,EncodeColor(colorBrightGreen)
+"BreakOut2","Neutral"))
+"\n"+EncodeColor(47)+"Signal(B):"+WriteIf(C>YY1,EncodeColor(colorBrightGreen)
+"BreakOut",WriteIf(C<XX1,EncodeColor(colorRed)+"BreakDown","Neutral"))
+"\n"+EncodeColor(colorPink)+"----------------------------------------"
+"\n"+EncodeColor(07)+"Volume: "+WriteIf(V>Vp2,EncodeColor(colorLime)+"Very
High",WriteIf(V>Vp1,EncodeColor(colorLime)+"
High",WriteIf(V>Vrg,EncodeColor(colorLime)+"Above Average",
WriteIf(V<Vrg AND V>Vn1,EncodeColor(colorRed)+"Less than
Average",WriteIf(V<Vn1,EncodeColor(colorRed)+"Low","")))))
+"\n"+EncodeColor(colorYellow)+"Spread: "+WriteIf(rg
>(arg*2),EncodeColor(colorLime)+" Wide",WriteIf(rg>arg,EncodeColor(colorLime)+"
Above Average",EncodeColor(colorRed)+" Narrow"))
+"\n"+(EncodeColor(colorYellow)+"Close: ")+WriteIf(Vhcls,EncodeColor(colorLime)
+"Very High",WriteIf(ucls,EncodeColor(colorLime)
+"High",WriteIf(mcls,EncodeColor(colorYellow)+"Mid",
WriteIf(dcls,EncodeColor(colorRed)+"Down","Very Low"))))
+"\n"+
EncodeColor(colorYellow) + "Status : " +
WriteIf(Weakness , EncodeColor(colorRed) + "Weak",
WriteIf(stoppingVolume , EncodeColor(colorCustom12) + "StoppingVol",
WriteIf(noSupplyBar , EncodeColor(colorLightOrange) + "NoSupply",
WriteIf(support , EncodeColor(colorLightBlue) + "SupportVol",
WriteIf(noDemandBar , EncodeColor(colorPink) + "NoDemand",
WriteIf(absorption, EncodeColor(colorSkyblue) + "Absorption",
WriteIf(upThrustBar, EncodeColor(colorBlue) + "Upthrust",
WriteIf(bullishsign, EncodeColor(colorPaleGreen) + "STRONG",
EncodeColor(colorTan) + "Neutral")))))))) + " "
+"\n"+EncodeColor(colorPink)+"----------------------------------------"
+"\n"+EncodeColor(49)+"KeyReversal : " + WriteIf(Buyr,EncodeColor(colorBrightGreen)
+"ReverseUP",WriteIf(Sellr,EncodeColor(colorRed)+"ReverseDown","Flat"))
+"\n"+EncodeColor(49) +"Phaze(LTPT) : " +
WriteIf(rc,EncodeColor(26)+"Recovery",WriteIf(ac,EncodeColor(colorGreen)
+"Accumulation",WriteIf(bl,EncodeColor(colorBrightGreen)
+"Bullish",WriteIf(wr,EncodeColor(colorOrange)
+"Warning",WriteIf(ds,EncodeColor(colorRed)
+"Distribution",WriteIf(br,EncodeColor(colorRed)+"Bearish","Neutral"))))))
//+"\n"+EncodeColor(49)+"T.Strength(ADX): "+StrFormat("%1.2f",ADX(per)) + WriteIf(
PDI(per)>MDI(per),EncodeColor(colorBrightGreen)+ " UP",EncodeColor(colorRed)+"
Down")
+"\n"+EncodeColor(49)+"PV BreakOut : " + WriteIf(HIV,EncodeColor(colorBrightGreen)
+"Positive",WriteIf(LIV,EncodeColor(colorRed)+"Negative","Neutral"))
+"\n"+EncodeColor(colorRose)+"----------------------------------------"
+"\n"+EncodeColor(02)+"BATS : "+ WriteIf(Betastops>C,EncodeColor(colorLightOrange)
+"Exit-1","")+WriteIf(Betastops2>C,EncodeColor(colorOrange)+"| Exit-2","")
+WriteIf(Betastops3>C,EncodeColor(colorRed)+" | Exit-3","")
//+"\n"+EncodeColor(colorRose)+"---------------------------"
//+"\n"+EncodeColor(02)+"PivotPoint: "+StrFormat("%1.2f",Pp)
//+"\n"+EncodeColor(colorCustom11)+"R1 "+StrFormat("%1.2f",R1)+" R2
"+StrFormat("%1.2f",R2)+" R3 "+StrFormat("%1.2f",R3)
//+"\n"+EncodeColor(11)+"S1 "+StrFormat("%1.2f",S1)+" S2 "+StrFormat("%1.2f",S2)+"
S3 "+StrFormat("%1.2f",S3)
+"\n"+EncodeColor(colorRose)+"----------------------------------------"
+"\n"+EncodeColor(11)+"FV : " //+ absFace_Value
+EncodeColor(44)+" Lot : " //+ absMarket_Lot
+EncodeColor(07)+" CataGory: " //+ absMarket_Category
+"\n"+EncodeColor(05)+"Electronic Share : "//+ absElectronic_Share
+"\n"+EncodeColor(colorRose)+"-------------------------------------------------"
_SECTION_END();
_SECTION_BEGIN("Name");
GfxSetOverlayMode(0);
GfxSelectFont("Tahoma", Status("pxheight")/8 );
GfxSetTextAlign( 6 );// center alignment
GfxSetTextColor( ColorHSB( 42, 42, 42 ) );
GfxSetBkMode(0); // transparent
GfxTextOut( Name(), Status("pxwidth")/2, Status("pxheight")/12 );
GfxSelectFont("Tahoma", Status("pxheight")/18 );
GfxTextOut("" , Status("pxwidth")/2, Status("pxheight")/4 );
GfxSelectFont("Tahoma", Status("pxheight")/18 );
GfxSelectFont("Tahoma", Status("pxheight")/36 );
GfxTextOut( "", Status("pxwidth")/2, Status("pxheight")/3 );
_SECTION_END();
Cover=Buy;
Short=Sell;
Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
AlertIf( Buy, "", "BUY @ " + C, 1 );
AlertIf( Sell, "", "SELL @ " + C, 2 );
no=Param( "Swing", 8, 1, 55 );
tsl_col=ParamColor( "Color", colorLightGrey );
res=HHV(H,no);
sup=LLV(L,no);
avd=IIf(C>Ref(res,-1),1,IIf(C<Ref(sup,-1),-1,0));
avn=ValueWhen(avd!=0,avd,1);
tsl=IIf(avn==1,sup,res);
tar1 = IIf(Buy OR Long AND NOT Relax AND NOT Sell AND NOT Cover, (BuyPrice +
BuyDifference), (SellPrice - SellDifference));
tar2 = IIf(Buy OR Long AND NOT Relax AND NOT Sell AND NOT Cover, (BuyPrice +
(2*BuyDifference)), (SellPrice - (2*SellDifference)));
tar3 = IIf(Buy OR Long AND NOT Relax AND NOT Sell AND NOT Cover, (BuyPrice +
(4*BuyDifference)), (SellPrice - (4*SellDifference)));
SellPrice=ValueWhen(Short,C,1);
BuyPrice=ValueWhen(Buy,C,1);
Long=Flip(Buy,Sell);
Shrt=Flip(Short,Cover);
Relax = NOT Long AND NOT Buy AND NOT shrt AND NOT Sell AND NOT Sell AND NOT Cover;
SellSL=ValueWhen(Short,DTSL,1);
BuySL=ValueWhen(Buy,DTSL,1);
BuyDifference= BuyPrice - BuySL;
SellDifference = SellSL - SellPrice;
tar1 = IIf(Buy OR Long AND NOT Relax AND NOT Sell AND NOT Cover, (BuyPrice +
BuyDifference), (SellPrice - SellDifference));
tar2 = IIf(Buy OR Long AND NOT Relax AND NOT Sell AND NOT Cover, (BuyPrice +
(2*BuyDifference)), (SellPrice - (2*SellDifference)));
tar3 = IIf(Buy OR Long AND NOT Relax AND NOT Sell AND NOT Cover, (BuyPrice +
(4*BuyDifference)), (SellPrice - (4*SellDifference)));
buyach1 = IIf((Buy OR Long AND NOT Relax AND NOT Cover AND NOT Short AND NOT Shrt),
H > tar1, 0);
buyach2 = IIf((Buy OR Long AND NOT Relax AND NOT Cover AND NOT Short AND NOT Shrt),
H > tar2 , 0);
buyach3 = IIf((Buy OR Long AND NOT Relax AND NOT Cover AND NOT Short AND NOT Shrt),
H > tar3, 0);
sellach1 = IIf((Short OR Shrt AND NOT Relax AND NOT Sell AND NOT Buy AND NOT Long),
L < tar1 , 0);
sellach2 = IIf((Short OR Shrt AND NOT Relax AND NOT Sell AND NOT Buy AND NOT Long),
L < tar2, 0);
sellach3 = IIf((Short OR Shrt AND NOT Relax AND NOT Sell AND NOT Buy AND NOT Long),
L < tar3, 0);
Filter=Buy OR Short;
AddColumn( IIf( Buy, 66 , 83 ), "Signal", formatChar, colorDefault, IIf( Buy ,
colorGreen, colorRed ) );
AddColumn(Close,"Entry Price",1.4, colorDefault, IIf( Buy , colorGreen,
colorRed ));
AddColumn(dtsl,"Stop Loss",1.4, colorDefault, IIf( Buy , colorGreen, colorRed ));
AddColumn(tar1,"Target 1",1.4, colorDefault, IIf( Buy , colorGreen, colorRed ));
AddColumn(tar2,"Target 2",1.4, colorDefault, IIf( Buy , colorGreen, colorRed ));
AddColumn(tar3,"Target 3",1.4, colorDefault, IIf( Buy , colorGreen, colorRed ));
AddColumn(Volume,"Volume",1.0, colorDefault, IIf ((Volume > 1.25 * EMA( Volume,
34 )),colorBlue,colorYellow));
//Short = Sell;
//Cover = Buy;
y = pxHeight;
dist = 2*ATR(10);
dist1 = 3*ATR(10);
i=BarCount;
bars = i;
if(messageboard)
{
for( i = 0; i < BarCount; i++ )
{
if( Buy[i] )
{
// PlotText( "\nBuy:" + L[ i ] + "\nT= " + (L[i]*1.005) + "\nSL= " +
(L[i]*0.9975), i, L[ i ]-dist[i], colorGreen, colorWhite );
SellPrice=ValueWhen(Sell,C,1);
BuyPrice=ValueWhen(Buy,L[ i ]);
Long=Flip(Buy,Sell);
Shrt=Flip(Sell,Buy );
BuyStop2 = L[i]*0.9975;
BuyTP1 = L[i]*1.070;
BuyTP2 = L[i]*1.050;
BuyTP3 = L[i]*1.035;
buyach1 = IIf((Buy OR Long AND NOT Relax AND NOT Cover AND NOT Short AND NOT Shrt),
H > BuyTP3, 0);
buyach2 = IIf((Buy OR Long AND NOT Relax AND NOT Cover AND NOT Short AND NOT Shrt),
H > BuyTP2, 0);
buyach3 = IIf((Buy OR Long AND NOT Relax AND NOT Cover AND NOT Short AND NOT Shrt),
H > BuyTP1, 0);
GfxSelectFont( "Tahoma", 13, 100 );
GfxSetOverlayMode( mode = 0 );
GfxSelectPen( colorBrightGreen, 3 );
GfxSelectSolidBrush( colorBrightGreen);
GfxRoundRect( x, y - 163, x2, y , 7, 7 ) ;
GfxSetTextColor( colorGold );
GfxTextOut( ( " Trading System "),73,y-165);
GfxTextOut( (" "),27,y-160);
GfxSetBkMode(1);
GfxSelectFont( "Arial", 10, 700, False );
GfxSetTextColor( colorBlue );
GfxSetTextAlign(0);
GfxSelectFont( "Tahoma", 13, 100 );
GfxSetTextColor( colorBlue );
GfxTextOut( WriteIf(SellTP1, "Short TGT1: "+(SellTP3),""), 13, y-100);
GfxTextOut( WriteIf(SellTP2, "Short TGT2: "+(SellTP2),""), 13, y-80);
GfxTextOut( WriteIf(SellTP3, "Short TGT3: "+(SellTP1),""), 13, y-60);
GfxSetTextColor( colorGold );
GfxTextOut( ("Current P/L : " + WriteVal(IIf(Sell ,(SellPrice-C),(SellPrice-
C)),2.2)), 88, y-22);
GfxTextOut( ("sell Signal came " + (BarCount-bars +1) * Interval()/1 + "
mins ago"), 13, y-40) ;
GfxTextOut
( ("" + WriteIf (sellach1, " Done: "+SellTP3,"")), 160, y-100);
GfxTextOut
( ("" + WriteIf (sellach2, " Done: "+SellTP2,"")), 160, y-80);
GfxTextOut
( ("" + WriteIf (sellach3, " Done: "+SellTP1,"")), 160, y-60);
// END of Signal Display Panel //
}}}
dist = 1.5*ATR(10);
for( i = 0; i < BarCount; i++ )
{