[url=http://bit.ly/c25MCx][img]http://e1205.hizliresim.com/x/3/57ksv.jpg[/img][/url]
Printable View
[url=http://bit.ly/c25MCx][img]http://e1205.hizliresim.com/x/3/57ksv.jpg[/img][/url]
Ekran ve sinyaller aynı.
SİNYAL YERLERİ AYNI AMA GÖRSEL OLARAK FARKLI BAŞKA FORMÜL AŞAĞIDA: _SECTION_END();
_SECTION_BEGIN("Support and Resistance");
xx=BarIndex();x=xx;Lx=LastValue(x);
nbar=Param("N Pivot Bars",3,2,50,1);
npiv=Param("N Pivots lookback period",1,1,50,1);
PivotSymmetry=ParamToggle("Use Symmetric Pivots","Off|On",0);
CleanPivots=ParamToggle("Use Clean Pivots","Off|On",0);
srStyle=ParamToggle("S/R Style","Off|On",1);
if (PivotSymmetry)
{
fc=1;
pk=H>Ref(HHV(H,nbar*fc),-1) AND Ref(HHV(H,nbar),nbar)<=H;
pk=pk AND Lx-ValueWhen(pk,x)>nbar*fc;
tr=L<Ref(LLV(L,nbar*fc),-1) AND Ref(LLV(L,nbar),nbar)>=L;
tr=tr AND Lx-ValueWhen(tr,x)>nbar*fc;
}
else
{
fc=2;
pk=H>Ref(HHV(H,nbar*fc),-1) AND Ref(HHV(H,nbar),nbar)<=H;
pk=pk AND Lx-ValueWhen(pk,x)>nbar*fc;
tr=L<Ref(LLV(L,nbar*fc),-1) AND Ref(LLV(L,nbar),nbar)>=L;
tr=tr AND Lx-ValueWhen(tr,x)>nbar*fc;
}
px0=ValueWhen(pk,x,0); tx0=ValueWhen(tr,x,0);
px1=ValueWhen(pk,x,1); tx1=ValueWhen(tr,x,1);
px2=ValueWhen(pk,x,2); tx2=ValueWhen(tr,x,2);
px3=ValueWhen(pk,x,3); tx3=ValueWhen(tr,x,3);
ph0=ValueWhen(pk,H,0); tl0=ValueWhen(tr,L,0);
ph1=ValueWhen(pk,H,1); tl1=ValueWhen(tr,L,1);
ph2=ValueWhen(pk,H,2); tl2=ValueWhen(tr,L,2);
ph3=ValueWhen(pk,H,3); tl3=ValueWhen(tr,L,3);
if (CleanPivots)
{
pk=IIf(pk AND px0<tx0 AND ph0>ph1,False,pk);
tr=IIf(tr AND px0>tx0 AND tl0<tl1,False,tr);
pk=IIf(pk AND px2>tx1 AND ph1<=ph2,False,pk);
tr=IIf(tr AND tx2>px1 AND tl1>=tl2,False,tr);
px0=ValueWhen(pk,x,0); tx0=ValueWhen(tr,x,0);
px1=ValueWhen(pk,x,1); tx1=ValueWhen(tr,x,1);
px2=ValueWhen(pk,x,2); tx2=ValueWhen(tr,x,2);
px3=ValueWhen(pk,x,3); tx3=ValueWhen(tr,x,3);
ph0=ValueWhen(pk,H,0); tl0=ValueWhen(tr,L,0);
ph1=ValueWhen(pk,H,1); tl1=ValueWhen(tr,L,1);
ph2=ValueWhen(pk,H,2); tl2=ValueWhen(tr,L,2);
ph3=ValueWhen(pk,H,3); tl3=ValueWhen(tr,L,3);
}
GraphXSpace=20;
//SetChartOptions(0,chartShowDates);
//SetBarFillColor(IIf(C>O,ColorRGB(0,175,0),IIf(C<=O,ColorRGB(175,0,0),colorLightGrey)));
//Plot(C,"\nPrice",IIf(C>O,ColorRGB(0,175,0),IIf(C<=O,ColorRGB(175,0,0),colorLightGrey)),64,0,0,0);
//plotting circles
//PlotShapes(shapeSmallCircle*tr,IIf(Lx-ValueWhen(tr,x)>nbar,ColorRGB(0,100,0),colorWhite),0,L,-10);
//PlotShapes(shapeSmallCircle*pk,IIf(Lx-ValueWhen(pk,x)>nbar,ColorRGB(255,0,0),colorWhite),0,H,10);
if(srstyle)
{
miny=Status("axisminy");
maxy=Status("axismaxy");
for (i=1;i<=npiv;i++)
{
rr=Ref(ValueWhen(pk,H,i),-nbar);
rr=IIf(rr>maxy OR rr<miny,Null,rr);
ss=Ref(ValueWhen(tr,L,i),-nbar);
ss=IIf(ss>maxy OR ss<miny,Null,ss);
//Plot(rr,"",colorBlue,styleNoLine|styleDots,0,0,0);
//Plot(ss,"",colorRed,styleNoLine|styleDots,0,0,0);
//Buy = Cross(H,rr);
//Sell= Cross(ss,L);
//PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorTurquoise, 0,L, Offset=-25);
//PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorOrange, 0,H, Offset=-25);
}
}
else
{
rr=ValueWhen(pk,H);
rr1=IIf(rr AND BarsSince(pk)>nbar,rr,Null);
rr2=IIf(rr AND BarsSince(pk)<=nbar,rr,Null);
ss=ValueWhen(tr,L);
ss1=IIf(ss AND BarsSince(tr)>nbar,ss,Null);
ss2=IIf(ss AND BarsSince(tr)<=nbar,ss,Null);
//Plot(rr1,"",colorRed,1);
//Plot(rr2,"",colorLightGrey,styleDots|styleNoLine);
//Plot(ss1,"",colorGreen,1);
//Plot(ss2,"",colorLightGrey,styleDots | styleNoLine);
}
/*
Title = EncodeColor(colorGreen)+ "Intraday Trades" + EncodeColor(colorRed) +" Open-"+O+" "+"High-"+H+" "+"Low-"+L+" "+
"Close-"+C+" "+ "Vol= "+ WriteVal(V)+"\n"+EncodeColor(colorTurquoise)+" BUY ABOVE - "+RR+" "+EncodeColor(colorOrange)+
" SELL BELOW - "+SS+" ";
*/
//_SECTION_END();
GfxSetBkMode( 1 );
GfxSetTextColor( colorBrown );
GfxSelectSolidBrush(colorBlack); // this is the box background color
GfxSelectFont( "Tahoma", 20, 100 );
pxHeight = Status( "pxchartheight" ) ;
xx = Status( "pxchartwidth");
Left = 1100;
width = 280;
x = 1235;
x2 = 980;
y = pxHeight;
//GfxSelectPen( colorGreen, 1); // broader color
//GfxRoundRect( x, y - 60, x2, y , 7, 7 ) ;
//GfxTextOut( ( " Trading System "),88,y-165);
GfxTextOut( (" "),27,y-160);
//GfxTextOut( ("BUY ABOVE : "+RR+" "), 13, y-58) ; // The text format location
//GfxTextOut( ("SELL BELOW : "+SS+""), 13, y-30);
//Modified by Sandipan
GfxTextOut( ("Support : "+SS+" "), 990, y-58) ; // The text format location
GfxTextOut( ("Resistance : "+RR+""), 990, y-30);
_SECTION_END();
_SECTION_BEGIN("Trend Lines");
p1 = Param("TL 1 Periods", 20, 5, 50, 1);
p2 = Param("TL 2 Periods", 5, 3, 25, 1);
TL1 = LinearReg(C, p1);
TL2 = EMA(TL1, p2);
Col1 = IIf(TL1 > TL2, ParamColor("TL Up Colour", colorGreen), ParamColor("TL Dn Colour", colorRed));
Plot(TL1, "TriggerLine 1", Col1, styleLine|styleThick|styleNoLabel);
Plot(TL2, "TriggerLine 2", Col1, styleLine|styleThick|styleNoLabel);
_SECTION_END();
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
SetChartBkGradientFill(ParamColor("Top", colorTeal), ParamColor("Bottom", colorLightGrey), ParamColor("Title", colorTeal));
SetChartBkColor(colorTeal);
R2PDS=20; /*for automatic adjustments to the r2 critical value line use one of the periods listed above*/
R2=Correlation(Cum( 1 ),C,r2pds)*Correlation(Cum( 1 ),C,r2pds);
slope=LinRegSlope(C,r2pds);
Crit=IIf(R2PDS==5,.77,IIf(R2PDS==10,.40,IIf(R2PDS==14,.27,IIf(R2PDS==20,.20,IIf(R2PDS==25,.16,IIf(R2PDS==30,.13,IIf(R2PDS==50,.08,IIf(R2PDS==60,.06,IIf(R2PDS==120,.03,0)))))))));
Ttl=EncodeColor(colorWhite)+ WriteIf(R2>Crit,"\nR2 Values indicate a Trend is in place","R2 Values Indicate a Trendliess Market")+WriteIf(slope>0," - Slope is Positive"," - Slope is Negative");
/*
"\n \n Interpretation \n r-squared values show the percentage of movement that can be explained by linear regression. For example, if the r-squared value over 20 days is at 70%, this means that 70% of the movement of the security is explained by linear regression. The other 30% is unexplained Random noise.\n While R2 values are interesting on their own they are easier to interpret when used in conjunction with Slope. When R2 exceeds its critical Value this indicates the market is Trending, when the indicator falls below its threshold then a trend less condition may be in place. \n This table shows the values of r-squared required for A 95% confidence level at various time periods. If the r-squared value is less than the critical values shown, you should assume that prices show no statistically significant trend. \n \n R-2 Pds Critical Value(95%confidence)"+
"\n \n 5 0.77\n 10 0.40\n 14 0.27\n 20 0.20\n 25 0.16\n 30 0.13\n 50 0.08 \n 60 0.06 \n 120 0.03"
+"\n \n You may even consider opening a Short-term position opposite the prevailing trend when you observe r-squared rounding off at extreme levels. For example, if the slope is positive AND r-squared is above 0.80 then begins to turn down, you may consider selling or opening A Short position. There are numerous ways to use the linear regression outputs of r-squared and Slope in trading systems. For more detailed coverage, refer to the book The New Technical Trader by Tushar Chande and Stanley Kroll";
*/
PO=TimeFrameGetPrice( "O", inDaily, -1 );
PL=TimeFrameGetPrice( "L", inDaily, -1 );
PH=TimeFrameGetPrice( "H", inDaily, -1 );
PC=TimeFrameGetPrice( "C", inDaily, -1 );
TO= TimeFrameGetPrice( "O", inDaily, 0 );
TH= TimeFrameGetPrice( "H", inDaily, 0 );
TL= TimeFrameGetPrice( "L", inDaily, 0 );
TC= TimeFrameGetPrice( "C", inDaily, 0 );
PC1= TimeFrameGetPrice( "C", inDaily, -2 );
P=((PH+PL+PC)/3);
R1=((2*P)-PL);
S1=((2*P)-PH);
R2=((P-S1)+R1);
S2=(P-(R1-S1));
R3=PH+(2*(P-PL));
S3=PL-(2*(PH-P));
R=TH-TL;
PP=(TH+TL+TO+TO)/4;
RR1=PP+(R*0.38);
RR2=PP+(R*0.62);
SS1=PP-(R*0.38);
SS2=PP-(R*0.62);
PPP=(TH+TL+TO+TO)/4;
RRR1=((2*PPP)-TL);
SSS1=((2*PPP)-TH);
RRR2=((PPP-SSS1)+RRR1);
SSS2=(PPP-(RRR1-SSS1));
Pchange=PC-PC1;
PPerChange=(Pchange/PC1)*100;
Tchange=TC-PC;
TPerChange=(Tchange/TC)*100;
Ttle= EncodeColor(colorWhite)+
"\nPrevious - Open :-"+PO+" High :-"+PH+" Low :-"+PL+" Close :-"+PC+" Change:- "+Pchange+" %ge:- "+WriteVal(PPerChange,1.2)+
"\nTodays - Open :-"+TO+" High :-"+TH+" Low :-"+TL+" Close :-"+TC+" Change:- "+Tchange+" %ge:- "+WriteVal(TPerChange,1.2)+
//"\n"+
//"\n"+
"\nLevels"+
"\nEOD Pivot :-"+WriteVal(P,1.2)+
"\nS-1 :-"+WriteVal(S1,1.2)+" - R-1 :-"+WriteVal(R1,1.2)+
"\nS-2 :-"+WriteVal(S2,1.2)+" - R-2 :-"+WriteVal(R2,1.2)+
"\nS-3 :-"+WriteVal(S3,1.2)+" - R-3 :-"+WriteVal(R3,1.2)+
//"\n"+
"\nIntraday Pivot :-"+WriteVal(PP,1.2)+
"\nS-1 :-"+WriteVal(SSS1,1.2)+" - R-1 :-"+WriteVal(RRR1,1.2)+
"\nS-2 :-"+WriteVal(SSS2,1.2)+" - R-2 :-"+WriteVal(RRR2,1.2)+
//"\n"+
"\nIntraday Retracement Levels"+
"\nS-1 :-"+WriteVal(SS1,1.2)+" - R-1:-"+WriteVal(RR1,1.2)+
"\nS-2 :-"+WriteVal(SS2,1.2)+" - R-2:-"+WriteVal(RR2,1.2);
//====================================Start of Linear Regression Code==================================================================================
P = ParamField("Price field",-1);
Length = 150;
Daysback = Param("Period for Liner Regression Line",Length,1,240,1);
shift = Param("Look back period",0,0,240,1);
//=============================== Math Formula ========================================================================================================
x = Cum(1);
lastx = LastValue( x ) - shift;
aa = LastValue( Ref(LinRegIntercept( p, Daysback), -shift) );
bb = LastValue( Ref(LinRegSlope( p, Daysback ), -shift) );
y = Aa + bb * ( x - (Lastx - DaysBack +1 ) );
//==================Plot the Linear Regression Line ====================================================================================================
LRColor = ParamColor("LR Color", colorCycle );
LRStyle = ParamStyle("LR Style");
LRLine = IIf( x > (lastx - Daysback) AND BarIndex() < Lastx, y, Null );
LRStyle = ParamStyle("LR Style");
Angle = Param("Angle", 0.05, 0, 1.5, 0.01);// A slope higher than 0.05 radians will turn green, less than -0.05 will turn red and anything in between will be white.
LRLine = IIf( x > (lastx - Daysback) AND BarIndex() < Lastx, y, Null );
Pi = 3.14159265 * atan(1); // Pi
SlopeAngle = atan(bb)*(180/Pi);
LineUp = SlopeAngle > Angle;
LineDn = SlopeAngle < - Angle;
if(LineUp)
{
Plot(LRLine, "Lin. Reg. Line Up", IIf(LineUp, colorBrightGreen, colorWhite), LRStyle);
}
else
{
Plot(LRLine, "Lin. Reg. Line Down", IIf(LineDn, colorDarkRed, colorWhite), LRStyle);
}
//========================== Plot 1st SD Channel ======================================================================================================
SDP = Param("Standard Deviation", 1.5, 0, 6, 0.1);
SD = SDP/2;
width = LastValue( Ref(SD*StDev(p, Daysback),-shift) ); //Set width of inside chanels here.
SDU = IIf( x > (lastx - Daysback) AND BarIndex() < Lastx, y+width , Null ) ;
SDL = IIf( x > (lastx - Daysback) AND BarIndex() < Lastx, y-width , Null ) ;
SDColor = ParamColor("SD Color", colorCycle );
SDStyle = ParamStyle("SD Style");
//Plot( SDU , "\nUpper Lin Reg", colorWhite,SDStyle ); //Inside Regression Lines
//Plot( SDL , "Lower Lin Reg", colorWhite,SDStyle ); //Inside Regression Lines
//========================== Plot 2d SD Channel ========================================================================================================
SDP2 = Param("2d Standard Deviation", 2.0, 0, 6, 0.1);
SD2 = SDP2/2;
width2 = LastValue( Ref(SD2*StDev(p, Daysback),-shift) ); //Set width of outside chanels here.
SDU2 = IIf( x > (lastx - Daysback) AND BarIndex() < Lastx, y+width2 , Null ) ;
SDL2 = IIf( x > (lastx - Daysback) AND BarIndex() < Lastx, y-width2 , Null ) ;
SDColor2 = ParamColor("2 SD Color", colorCycle );
SDStyle2 = ParamStyle("2 SD Style");
//Plot( SDU2 , "Upper Lin Reg", colorWhite,SDStyle2 ); //OutSide Regression Lines
//Plot( SDL2 , "Lower Lin Reg", colorWhite,SDStyle2 ); //OutSide Regression Lines
Trend = IIf(LRLine > Ref(LRLine,-1),colorGreen,colorRed);//Changes LR line to green if sloping up and red if sloping down.
Plot( LRLine , "LinReg", Trend, LRSTYLE );
//============================ End Indicator Code ========================================================================================================
_N(Title = EncodeColor(55)+StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) )+" "+Ttl+Ttle);
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
_SECTION_BEGIN("SAR");
//P = ParamField( "Price field" );
//T3MA toggle
T3MAT=ParamToggle("Moving Average","No|Yes",defaultval=1 );
T3MAP = Param("T3MA Periods", 21, 2, 300, 1, 10 );
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;
}
T3MA = T3(P,T3MAP);
//T3MA Display
//T3MAB1=0;
//T3MAS1=0
if(T3MAT==1)
{
T3MABuy = Cross(C,T3MA);
//if(T3MABuy)
//T3MAB1=1;
T3MASell = Cross(T3MA,C);
//if(T3MASell)
//T3MAS1=1;
T3MAcolor = IIf(C>=T3MA,colorBlue,colorYellow);
Plot(T3MA,"\nT3MA",T3MAcolor,styleThick);
PlotShapes(shapeStar*T3MABuy,colorWhite,0,L,-20);
PlotShapes(shapeStar*T3MASell,colorBlack,0,H,20);
//T3MAShape = T3MABuy * shapeHollowStar + T3MASell * shapeHollowStar;
//PlotShapes(T3MAShape, IIf(T3MABuy ,colorGreen,colorRed), 0,IIf(T3MABuy ,Low,High));
}
//mau = TEMA(C,20);
//Plot(Ref(mau, -1),"MA20", colorGreen, styleThick) ;
//mav = TEMA(C,50);
//Plot(Ref(mav, -1),"MA50", colorGold, styleThick) ;
/*for automatic adjustments to the r2 critical value line use one of the periods listed above*/
/*
R2PDS=20;
R2=Correlation(Cum( 1 ),C,r2pds)*Correlation(Cum( 1 ),C,r2pds);
slope=LinRegSlope(C,r2pds);
Crit=IIf(R2PDS==5,.77,IIf(R2PDS==10,.40,IIf(R2PDS==14,.27,IIf(R2PDS==20,.20,IIf(R2PDS==25,.16,IIf(R2PDS==30,.13,IIf(R2PDS==50,.08,IIf(R2PDS==60,.06,IIf(R2PDS==120,.03,0)))))))));
*/
//Title=WriteIf(R2>Crit,"R2 Values indicate a Trend is in place","R2 Values Indicate a Trendliess Market")+WriteIf(slope>0,"\n Slope is Positive","\n Slope is Negative");
/*
"\n \n Interpretation \n r-squared values show the percentage of movement that can be explained by linear regression. For example, if the r-squared value over 20 days is at 70%, this means that 70% of the movement of the security is explained by linear regression. The other 30% is unexplained Random noise.\n While R2 values are interesting on their own they are easier to interpret when used in conjunction with Slope. When R2 exceeds its critical Value this indicates the market is Trending, when the indicator falls below its threshold then a trend less condition may be in place. \n This table shows the values of r-squared required for A 95% confidence level at various time periods. If the r-squared value is less than the critical values shown, you should assume that prices show no statistically significant trend. \n \n R-2 Pds Critical Value(95%confidence)"+
"\n \n 5 0.77\n 10 0.40\n 14 0.27\n 20 0.20\n 25 0.16\n 30 0.13\n 50 0.08 \n 60 0.06 \n 120 0.03"
+"\n \n You may even consider opening a Short-term position opposite the prevailing trend when you observe r-squared rounding off at extreme levels. For example, if the slope is positive AND r-squared is above 0.80 then begins to turn down, you may consider selling or opening A Short position. There are numerous ways to use the linear regression outputs of r-squared and Slope in trading systems. For more detailed coverage, refer to the book The New Technical Trader by Tushar Chande and Stanley Kroll";
*/
acc = Param("Acceleration", 0.1, 0, 1, 0.001 );
accm = Param("Max. acceleration", 0.06, 0, 1, 0.001 );
SAR1 = SAR(acc,accm);
//Buy1 = Cross(Open, SAR(acc,accm)) AND (T3MAB1==1);
//Sell1 = Cross(SAR(acc,accm), Open ) AND (T3MAS1==1);
Buy1 = Cross(Open, SAR(acc,accm));
Sell1 = Cross(SAR(acc,accm), Open );
if (ParamToggle("SAR","Show|Hide",1)){
Plot(SAR1,"",1,styleDots|styleNoLine);
PlotShapes(IIf(Buy1,shapeUpArrow,shapeNone), colorYellow, 0, Low, Offset=-15);
PlotShapes(IIf(Buy1,shapeSmallCircle,shapeNone), colorYellow, 0, Low, Offset=-28);
PlotShapes(IIf(Sell1, shapeDownArrow,shapeNone), colorWhite, 0, High, Offset=-15);
PlotShapes(IIf(Sell1, shapeSmallCircle,shapeNone), colorWhite, 0, High, Offset= 28);
}
_SECTION_END();
messageboard = ParamToggle("Message Board","Show|Hide",0);
exitlong = Sell1;
PlotShapes(exitlong * shapeDownArrow, colorBlack,0,H,-10);
exitshort = Buy1;
PlotShapes(exitshort * shapeUpArrow, colorBlack,0,L,-15);
Buy = exitshort;
Sell = exitlong;
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
AlertIf( Buy, "", "BUY @ " + C, 1 );
AlertIf( Sell, "", "SELL @ " + C, 2 );
for(i=BarCount-1;i>1;i--)
{
if(Buy[i] == 1)
{
entry = C[i];
sig = "BUY";
sl = sar1[i];
tar1 = entry + (entry * .0056);
tar2 = entry + (entry * .0116);
tar3 = entry + (entry * .0216);
bars = i;
i = 0;
}
if(Sell[i] == 1)
{
sig = "SELL";
entry = C[i];
sl = SAR1[i];
tar1 = entry - (entry * .0056);
tar2 = entry - (entry * .0116);
tar3 = entry - (entry * .0216);
bars = i;
i = 0;
}
}
Offset = 20;
Clr = IIf(sig == "BUY", colorLime, colorRed);
ssl = IIf(bars == BarCount-1, sar1[BarCount-1], Ref(SAR1, -1));
sl = ssl[BarCount-1];
Plot(LineArray(bars-Offset, tar1, BarCount, tar1,1), "", Clr, styleLine|styleDots, Null, Null, Offset);
Plot(LineArray(bars-Offset, tar2, BarCount, tar2,1), "", Clr, styleLine|styleDots, Null, Null, Offset);
Plot(LineArray(bars-Offset, tar3, BarCount, tar3,1), "", Clr, styleLine|styleDots, Null, Null, Offset);
Plot(LineArray(bars-Offset, sl, BarCount, sl,1), "", colorDarkRed, styleLine|styleLine, Null, Null, Offset);
Plot(LineArray(bars-Offset, entry, BarCount, entry,1), "", colorGreen, styleLine|styleLine, Null, Null, Offset);
for (i=bars; i <BarCount;i++)
{
PlotText(""+sig+"@"+entry, BarCount+1,entry,Null,colorBlue);
PlotText("T1@"+tar1,BarCount+3,tar1,Null,Clr);PlotText("T2@"+tar2,BarCount+3,tar2,Null,Clr);PlotText ("T3@"+tar3,BarCount+3,tar3,Null,Clr);
}
printf("Last " + sig + " Signal came " + (BarCount-bars) + " bars ago");
printf("\n" + sig + " @ : " + entry + "\nStop Loss : " + sl + " (" + WriteVal(IIf(sig == "SELL",entry-sl,sl-entry), 2.2) + ")"+ "\nTarget_1 : " + tar1 + "\nTarget_2 : " + tar2 + "\nTarget_3 : " + tar3);
printf("\nCurrent P/L : " + WriteVal(IIf(sig == "BUY",(C-entry),(entry-C)),2.2));
if (messageboard == 0 )
{
GfxSelectFont( "Tahoma", 9, 100 );
GfxSetBkMode( 1 );
GfxSetTextColor( colorWhite );
if ( sig =="BUY")
{
GfxSelectSolidBrush( colorBlue ); // this is the box background color
}
else
{
GfxSelectSolidBrush( colorRed ); // this is the box background color
}
pxHeight = Status( "pxchartheight" ) ;
xx = Status( "pxchartwidth");
Left = 1100;
width = 310;
x = 5;
x2 = 210;
y = pxHeight;
GfxSelectPen( colorGreen, 1); // broader color
GfxRoundRect( x, y - 163, x2, y , 7, 7 ) ;
GfxTextOut( ( " Message Box "),88,y-165);
GfxTextOut( (" "),27,y-160);
GfxTextOut( ("Last " + sig + " Signal came " + (BarCount-bars-1) * Interval()/60 + " mins ago"), 13, y-140) ; // The text format location
GfxTextOut( ("" + WriteIf(sig =="BUY",sig + " @ ",sig + " @") + " : " + entry), 13, y-120);
GfxTextOut( ("Trailing SL : " + sl + " (" + WriteVal(IIf(sig == "SELL",entry-sl,sl-entry), 2.2) + ")"), 13, y-100);
GfxTextOut( ("TGT:1 : " + tar1), 13, y -80);
GfxTextOut( ("TGT:2 : " + tar2), 13,y-60);
GfxTextOut( ("TGT:3 : " + tar3), 13,y-40);
GfxTextOut( ("Current P/L : " + WriteVal(IIf(sig == "BUY",(C-entry),(entry-C)),2.2)), 88, y-22);;
}
_SECTION_BEGIN("ADX");
uptrend=PDI()>MDI()AND Signal()<MACD();
downtrend=MDI()>PDI()AND Signal()>MACD();
Plot( 2, "ADX",IIf( uptrend, colorGreen, IIf( downtrend, colorRed, colorBlack )), styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
_SECTION_END();
GraphXSpace=5;
Eur/usd düştüğü halde dax yükseliyor.piyasada 3.ltro beklentisi var galiba
Sn. Engin amibroker ekran görüntüsünü forumda nasıl gösterebilirim.
[quote=kokohan23;403945]Hükümetin en büyük savunması kendi dönemlerinde para basılmaması.peki insanların bankalardan aldıkları kredi miktarı 2002 de neydi şimdi ne.bu parasal genişleme değilde nedir.mbları bankalar kredi vermeye yanaşmadığı zaman parasal genişleme yaparlar.bizde bankalr mevduatının %100 ünü vatandaşa kredi olarak verdiği için gerek klamadı para basmaya.ama allah korusun büyük bir krizde teminatlandırdıkları konutları bu fiyatlardan kime satabilirler soru işareti.resmen konut balonu oluştu türkiye de.sıcak para kaçmaya başlarsa büyük küçük demeden tüm bankalr batma noktasına gelir.bunun olmaamsı için türkiyenin kaynak oluşturması veya katma değeri yüksek ürünleri üretip ihracat yapması lazım.2.şık çok uzun bir süreç.2012 belki. Ama birinci şık şu kayagazı olayıyla olabilir.türkiye de erzurum.diyarbakır ve trakya bölgesinde ülkenin 40 senelik enerji ihtiyacını karşılayacak rezervler bulunmuş.[/quote]
Bor vardı toryum vardı uranyum vardı dendi de ne oldu ki onla birşey olsun.
Kayagazı ile ithalatçı amerika ihracatçı oldu. Ama biz ithalatçı geldik ithalatçı gideriz.
[U][IMG]http://img843.imageshack.us/img843/2154/67049894.png[/IMG][/U]
dow yeni zirve tazeleyemezse tüm piyasalarda sert aşağı dalgalanmalar başlar.
[url=http://bit.ly/c25MCx][img]http://g1205.hizliresim.com/x/3/57mkn.jpg[/img][/url]:..:
Sn.kokohan23 ikinci verdiğiniz de birincisi gibi çalışmadı.
Sn.EnginSözmen'in birinci verdiğinizi düzeltilmiş şekildeki ise çalışıyor.
indikler için de ayrıca TEŞEKKÜR EDERİM.
Bende mi hata var?
hata mesajlarından bir örnek
R2=Correlation(Cum( 1 ),C,r2pds)*Correlation(Cum( 1 ),C,r2pds);
slope=LinRegSlope(C,r2pds);
Crit=IIf(R2PDS==5,.77,IIf(R2PDS==10,.40,IIf(R2PDS= =
---------------------------------------------------^
Error 32.
Syntax error, unexpected '='. Is there semicolon missing at the
Sn. Arkadaşlar, İyi günler, bol kazançlar.
Hepiniz hoşgeldiniz. Özlettiniz yani.
xx=[SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]BarIndex[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]();x=xx;Lx=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](x);
nbar=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Param[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"N Pivot Bars"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]50[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
npiv=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Param[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"N Pivots lookback period"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]50[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
PivotSymmetry=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ParamToggle[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Use Symmetric Pivots"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Off|On"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
CleanPivots=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ParamToggle[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Use Clean Pivots"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Off|On"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
srStyle=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ParamToggle[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"S/R Style"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Off|On"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
[/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (PivotSymmetry)
{
fc=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
pk=[B]H[/B]>[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Ref[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]HHV[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]H[/B],nbar*fc),-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]) [B]AND[/B] [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Ref[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]HHV[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]H[/B],nbar),nbar)<=[B]H[/B];
pk=pk [B]AND[/B] Lx-[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](pk,x)>nbar*fc;
tr=[B]L[/B]<[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Ref[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LLV[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]L[/B],nbar*fc),-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]) [B]AND[/B] [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Ref[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LLV[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]L[/B],nbar),nbar)>=[B]L[/B];
tr=tr [B]AND[/B] Lx-[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](tr,x)>nbar*fc;
}
[/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]else
[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]{
fc=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
pk=[B]H[/B]>[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Ref[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]HHV[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]H[/B],nbar*fc),-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]) [B]AND[/B] [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Ref[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]HHV[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]H[/B],nbar),nbar)<=[B]H[/B];
pk=pk [B]AND[/B] Lx-[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](pk,x)>nbar*fc;
tr=[B]L[/B]<[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Ref[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LLV[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]L[/B],nbar*fc),-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]) [B]AND[/B] [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Ref[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LLV[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]L[/B],nbar),nbar)>=[B]L[/B];
tr=tr [B]AND[/B] Lx-[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](tr,x)>nbar*fc;
}
px0=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](pk,x,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]); tx0=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](tr,x,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
px1=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](pk,x,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]); tx1=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](tr,x,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
px2=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](pk,x,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]); tx2=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](tr,x,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
px3=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](pk,x,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]); tx3=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](tr,x,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
ph0=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](pk,[B]H[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]); tl0=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](tr,[B]L[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
ph1=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](pk,[B]H[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]); tl1=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](tr,[B]L[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
ph2=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](pk,[B]H[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]); tl2=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](tr,[B]L[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
ph3=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](pk,[B]H[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]); tl3=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](tr,[B]L[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
[/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (CleanPivots)
{
pk=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](pk [B]AND[/B] px0<tx0 [B]AND[/B] ph0>ph1,[B]False[/B],pk);
tr=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](tr [B]AND[/B] px0>tx0 [B]AND[/B] tl0<tl1,[B]False[/B],tr);
pk=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](pk [B]AND[/B] px2>tx1 [B]AND[/B] ph1<=ph2,[B]False[/B],pk);
tr=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](tr [B]AND[/B] tx2>px1 [B]AND[/B] tl1>=tl2,[B]False[/B],tr);
px0=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](pk,x,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]); tx0=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](tr,x,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
px1=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](pk,x,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]); tx1=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](tr,x,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
px2=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](pk,x,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]); tx2=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](tr,x,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
px3=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](pk,x,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]); tx3=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](tr,x,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
ph0=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](pk,[B]H[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]); tl0=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](tr,[B]L[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
ph1=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](pk,[B]H[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]); tl1=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](tr,[B]L[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
ph2=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](pk,[B]H[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]); tl2=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](tr,[B]L[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
ph3=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](pk,[B]H[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]); tl3=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](tr,[B]L[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
}
[B]GraphXSpace[/B]=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]20[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
[/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//SetChartOptions(0,chartShowDates);
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1][/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//SetBarFillColor(IIf(C>O,ColorRGB(0,175,0),IIf(C<=O ,ColorRGB(175,0,0),colorLightGrey)));
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1][/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//Plot(C,"\nPrice",IIf(C>O,ColorRGB(0,175,0),IIf(C<= O,ColorRGB(175,0,0),colorLightGrey)),64,0,0,0);
//plotting circles
//PlotShapes(shapeSmallCircle*tr,IIf(Lx-ValueWhen(tr,x)>nbar,ColorRGB(0,100,0),colorWhite) ,0,L,-10);
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1][/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//PlotShapes(shapeSmallCircle*pk,IIf(Lx-ValueWhen(pk,x)>nbar,ColorRGB(255,0,0),colorWhite) ,0,H,10);
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]
[/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](srstyle)
{
miny=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Status[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"axisminy"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
maxy=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Status[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"axismaxy"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
[/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]for[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (i=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];i<=npiv;i++)
{
rr=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Ref[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](pk,[B]H[/B],i),-nbar);
rr=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](rr>maxy [B]OR[/B] rr<miny,[B]Null[/B],rr);
ss=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Ref[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](tr,[B]L[/B],i),-nbar);
ss=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](ss>maxy [B]OR[/B] ss<miny,[B]Null[/B],ss);
[/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//Plot(rr,"",colorBlue,styleNoLine|styleDots,0,0,0);
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1][/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//Plot(ss,"",colorRed,styleNoLine|styleDots,0,0,0);
//Buy = Cross(H,rr);
//Sell= Cross(ss,L);
//PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorTurquoise, 0,L, Offset=-25);
//PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorOrange, 0,H, Offset=-25);
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]}
}
[/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]else
[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]{
rr=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](pk,[B]H[/B]);
rr1=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](rr [B]AND[/B] [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]BarsSince[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](pk)>nbar,rr,[B]Null[/B]);
rr2=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](rr [B]AND[/B] [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]BarsSince[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](pk)<=nbar,rr,[B]Null[/B]);
ss=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](tr,[B]L[/B]);
ss1=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](ss [B]AND[/B] [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]BarsSince[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](tr)>nbar,ss,[B]Null[/B]);
ss2=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](ss [B]AND[/B] [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]BarsSince[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](tr)<=nbar,ss,[B]Null[/B]);
[/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//Plot(rr1,"",colorRed,1);
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1][/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//Plot(rr2,"",colorLightGrey,styleDots|styleNoLine);
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1][/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//Plot(ss1,"",colorGreen,1);
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1][/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//Plot(ss2,"",colorLightGrey,styleDots | styleNoLine);
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]}
[/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]/*
Title = EncodeColor(colorGreen)+ "Intraday Trades" + EncodeColor(colorRed) +" Open-"+O+" "+"High-"+H+" "+"Low-"+L+" "+
"Close-"+C+" "+ "Vol= "+ WriteVal(V)+"\n"+EncodeColor(colorTurquoise)+" BUY ABOVE - "+RR+" "+EncodeColor(colorOrange)+
" SELL BELOW - "+SS+" ";
*/
//_SECTION_END();
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1][/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GfxSetBkMode[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] );
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GfxSetTextColor[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [B]colorBrown[/B] );
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GfxSelectSolidBrush[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]colorBlack[/B]); [/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]// this is the box background color
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1][/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GfxSelectFont[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Tahoma"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]20[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]100[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] );
pxHeight = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Status[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"pxchartheight"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ) ;
xx = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Status[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"pxchartwidth"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
Left = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1100[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
width = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]280[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
x = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1235[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
x2 = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]980[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
y = pxHeight;
[/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//GfxSelectPen( colorGreen, 1); // broader color
//GfxRoundRect( x, y - 60, x2, y , 7, 7 ) ;
//GfxTextOut( ( " Trading System "),88,y-165);
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GfxTextOut[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( ([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]),[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]27[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],y-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]160[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
[/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//GfxTextOut( ("BUY ABOVE : "+RR+" "), 13, y-58) ; // The text format location
//GfxTextOut( ("SELL BELOW : "+SS+""), 13, y-30);
//Modified by Sandipan
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GfxTextOut[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( ([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Support : "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+SS+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]), [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]990[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], y-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]58[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]) ; [/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]// The text format location
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GfxTextOut[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( ([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Resistance : "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+RR+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]), [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]990[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], y-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]30[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
[/SIZE][SIZE=1][COLOR=#969696][SIZE=1][COLOR=#969696]_SECTION_END[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]();
[/SIZE][SIZE=1][COLOR=#969696][SIZE=1][COLOR=#969696]_SECTION_BEGIN[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Trend Lines"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
p1 = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Param[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"TL 1 Periods"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]20[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]50[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
p2 = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Param[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"TL 2 Periods"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]25[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
TL1 = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LinearReg[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]C[/B], p1);
TL2 = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]EMA[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](TL1, p2);
Col1 = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](TL1 > TL2, [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ParamColor[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"TL Up Colour"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]colorGreen[/B]), [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ParamColor[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"TL Dn Colour"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]colorRed[/B]));
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Plot[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](TL1, [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"TriggerLine 1"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], Col1, [B]styleLine[/B]|[B]styleThick[/B]|[B]styleNoLabel[/B]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Plot[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](TL2, [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"TriggerLine 2"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], Col1, [B]styleLine[/B]|[B]styleThick[/B]|[B]styleNoLabel[/B]);
[/SIZE][SIZE=1][COLOR=#969696][SIZE=1][COLOR=#969696]_SECTION_END[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]();
[/SIZE][SIZE=1][COLOR=#969696][SIZE=1][COLOR=#969696]_SECTION_BEGIN[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Price"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]SetChartOptions[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[B]chartShowArrows[/B]|[B]chartShowDates[/B]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]SetChartBkGradientFill[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ParamColor[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Top"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]colorTeal[/B]), [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ParamColor[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Bottom"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]colorLightGrey[/B]), [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ParamColor[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Title"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]colorTeal[/B]));
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]SetChartBkColor[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]colorTeal[/B]);
R2PDS=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]20[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]; [/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]/*for automatic adjustments to the r2 critical value line use one of the periods listed above*/
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]R2=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Correlation[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Cum[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ),[B]C[/B],r2pds)*[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Correlation[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Cum[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ),[B]C[/B],r2pds);
slope=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LinRegSlope[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]C[/B],r2pds);
Crit=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](R2PDS==[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],.77,[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](R2PDS==[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]10[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],.40,[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](R2PDS==[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]14[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],.27,[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](R2PDS==[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]20[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],.20,[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](R2PDS==[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]25[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],.16,[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](R2PDS==[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]30[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],.13,[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](R2PDS==[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]50[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],.08,[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](R2PDS==[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]60[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],.06,[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](R2PDS==[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]120[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],.03,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])))))))));
Ttl=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]EncodeColor[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]colorWhite[/B])+ [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]WriteIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](R2>Crit,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"\nR2 Values indicate a Trend is in place"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"R2 Values Indicate a Trendliess Market"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])+[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]WriteIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](slope>[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" - Slope is Positive"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" - Slope is Negative"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
[/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]/*
"\n \n Interpretation \n r-squared values show the percentage of movement that can be explained by linear regression. For example, if the r-squared value over 20 days is at 70%, this means that 70% of the movement of the security is explained by linear regression. The other 30% is unexplained Random noise.\n While R2 values are interesting on their own they are easier to interpret when used in conjunction with Slope. When R2 exceeds its critical Value this indicates the market is Trending, when the indicator falls below its threshold then a trend less condition may be in place. \n This table shows the values of r-squared required for A 95% confidence level at various time periods. If the r-squared value is less than the critical values shown, you should assume that prices show no statistically significant trend. \n \n R-2 Pds Critical Value(95%confidence)"+
"\n \n 5 0.77\n 10 0.40\n 14 0.27\n 20 0.20\n 25 0.16\n 30 0.13\n 50 0.08 \n 60 0.06 \n 120 0.03"
+"\n \n You may even consider opening a Short-term position opposite the prevailing trend when you observe r-squared rounding off at extreme levels. For example, if the slope is positive AND r-squared is above 0.80 then begins to turn down, you may consider selling or opening A Short position. There are numerous ways to use the linear regression outputs of r-squared and Slope in trading systems. For more detailed coverage, refer to the book The New Technical Trader by Tushar Chande and Stanley Kroll";
*/
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]PO=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]TimeFrameGetPrice[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"O"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]inDaily[/B], -[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] );
PL=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]TimeFrameGetPrice[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"L"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]inDaily[/B], -[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] );
PH=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]TimeFrameGetPrice[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"H"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]inDaily[/B], -[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] );
PC=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]TimeFrameGetPrice[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"C"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]inDaily[/B], -[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] );
TO= [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]TimeFrameGetPrice[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"O"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]inDaily[/B], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] );
TH= [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]TimeFrameGetPrice[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"H"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]inDaily[/B], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] );
TL= [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]TimeFrameGetPrice[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"L"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]inDaily[/B], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] );
TC= [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]TimeFrameGetPrice[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"C"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]inDaily[/B], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] );
PC1= [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]TimeFrameGetPrice[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"C"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]inDaily[/B], -[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] );
P=((PH+PL+PC)/[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
R1=(([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]*P)-PL);
S1=(([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]*P)-PH);
R2=((P-S1)+R1);
S2=(P-(R1-S1));
R3=PH+([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]*(P-PL));
S3=PL-([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]*(PH-P));
R=TH-TL;
PP=(TH+TL+TO+TO)/[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]4[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
RR1=PP+(R*[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.38[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
RR2=PP+(R*[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.62[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
SS1=PP-(R*[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.38[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
SS2=PP-(R*[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.62[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
PPP=(TH+TL+TO+TO)/[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]4[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
RRR1=(([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]*PPP)-TL);
SSS1=(([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]*PPP)-TH);
RRR2=((PPP-SSS1)+RRR1);
SSS2=(PPP-(RRR1-SSS1));
Pchange=PC-PC1;
PPerChange=(Pchange/PC1)*[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]100[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
Tchange=TC-PC;
TPerChange=(Tchange/TC)*[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]100[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
Ttle= [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]EncodeColor[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]colorWhite[/B])+
[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"\nPrevious - Open :-"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+PO+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" High :-"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+PH+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" Low :-"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+PL+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" Close :-"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+PC+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" Change:- "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+Pchange+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" %ge:- "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]WriteVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](PPerChange,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])+
[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"\nTodays - Open :-"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+TO+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" High :-"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+TH+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" Low :-"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+TL+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" Close :-"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+TC+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" Change:- "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+Tchange+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" %ge:- "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]WriteVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](TPerChange,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])+
[/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//"\n"+
//"\n"+
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"\nLevels"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+
[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"\nEOD Pivot :-"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]WriteVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](P,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])+
[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"\nS-1 :-"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]WriteVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](S1,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" - R-1 :-"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]WriteVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](R1,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])+
[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"\nS-2 :-"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]WriteVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](S2,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" - R-2 :-"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]WriteVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](R2,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])+
[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"\nS-3 :-"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]WriteVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](S3,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" - R-3 :-"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]WriteVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](R3,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])+
[/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//"\n"+
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"\nIntraday Pivot :-"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]WriteVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](PP,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])+
[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"\nS-1 :-"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]WriteVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](SSS1,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" - R-1 :-"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]WriteVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](RRR1,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])+
[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"\nS-2 :-"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]WriteVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](SSS2,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" - R-2 :-"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]WriteVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](RRR2,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])+
[/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//"\n"+
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"\nIntraday Retracement Levels"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+
[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"\nS-1 :-"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]WriteVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](SS1,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" - R-1:-"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]WriteVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](RR1,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])+
[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"\nS-2 :-"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]WriteVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](SS2,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" - R-2:-"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]WriteVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](RR2,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
[/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//====================================Start of Linear Regression Code============================================== ====================================
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]P = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ParamField[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Price field"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
Length = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]150[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
Daysback = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Param[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Period for Liner Regression Line"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],Length,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]240[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
shift = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Param[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Look back period"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]240[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
[/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//=============================== Math Formula ================================================== ================================================== ====
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]x = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Cum[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
lastx = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( x ) - shift;
aa = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Ref[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LinRegIntercept[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( p, Daysback), -shift) );
bb = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Ref[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LinRegSlope[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( p, Daysback ), -shift) );
y = Aa + bb * ( x - (Lastx - DaysBack +[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ) );
[/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//==================Plot the Linear Regression Line ================================================== ==================================================
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]LRColor = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ParamColor[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"LR Color"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], colorCycle );
LRStyle = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ParamStyle[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"LR Style"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
LRLine = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( x > (lastx - Daysback) [B]AND[/B] [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]BarIndex[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]() < Lastx, y, [B]Null[/B] );
LRStyle = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ParamStyle[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"LR Style"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
Angle = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Param[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Angle"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.05[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.01[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);[/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]// A slope higher than 0.05 radians will turn green, less than -0.05 will turn red and anything in between will be white.
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]LRLine = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( x > (lastx - Daysback) [B]AND[/B] [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]BarIndex[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]() < Lastx, y, [B]Null[/B] );
Pi = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3.14159265[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] * [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]atan[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]); [/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]// Pi
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]SlopeAngle = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]atan[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](bb)*([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]180[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]/Pi);
LineUp = SlopeAngle > Angle;
LineDn = SlopeAngle < - Angle;
[/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](LineUp)
{
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Plot[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](LRLine, [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Lin. Reg. Line Up"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](LineUp, [B]colorBrightGreen[/B], [B]colorWhite[/B]), LRStyle);
}
[/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]else
[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]{
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Plot[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](LRLine, [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Lin. Reg. Line Down"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](LineDn, [B]colorDarkRed[/B], [B]colorWhite[/B]), LRStyle);
}
[/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//========================== Plot 1st SD Channel ================================================== ================================================== ==
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]SDP = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Param[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Standard Deviation"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]6[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
SD = SDP/[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
width = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Ref[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](SD*[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]StDev[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](p, Daysback),-shift) ); [/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//Set width of inside chanels here.
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]SDU = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( x > (lastx - Daysback) [B]AND[/B] [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]BarIndex[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]() < Lastx, y+width , [B]Null[/B] ) ;
SDL = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( x > (lastx - Daysback) [B]AND[/B] [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]BarIndex[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]() < Lastx, y-width , [B]Null[/B] ) ;
SDColor = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ParamColor[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"SD Color"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], colorCycle );
SDStyle = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ParamStyle[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"SD Style"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
[/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//Plot( SDU , "\nUpper Lin Reg", colorWhite,SDStyle ); //Inside Regression Lines
//Plot( SDL , "Lower Lin Reg", colorWhite,SDStyle ); //Inside Regression Lines
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1][/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//========================== Plot 2d SD Channel ================================================== ================================================== ====
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]SDP2 = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Param[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"2d Standard Deviation"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2.0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]6[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
SD2 = SDP2/[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
width2 = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Ref[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](SD2*[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]StDev[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](p, Daysback),-shift) ); [/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//Set width of outside chanels here.
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]SDU2 = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( x > (lastx - Daysback) [B]AND[/B] [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]BarIndex[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]() < Lastx, y+width2 , [B]Null[/B] ) ;
SDL2 = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( x > (lastx - Daysback) [B]AND[/B] [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]BarIndex[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]() < Lastx, y-width2 , [B]Null[/B] ) ;
SDColor2 = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ParamColor[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"2 SD Color"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], colorCycle );
SDStyle2 = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ParamStyle[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"2 SD Style"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
[/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//Plot( SDU2 , "Upper Lin Reg", colorWhite,SDStyle2 ); //OutSide Regression Lines
//Plot( SDL2 , "Lower Lin Reg", colorWhite,SDStyle2 ); //OutSide Regression Lines
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]Trend = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](LRLine > [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Ref[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](LRLine,-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]),[B]colorGreen[/B],[B]colorRed[/B]);[/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//Changes LR line to green if sloping up and red if sloping down.
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1][/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Plot[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( LRLine , [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"LinReg"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], Trend, LRSTYLE );
[/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//============================ End Indicator Code ================================================== ================================================== ====
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1][/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]_N[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]Title[/B] = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]EncodeColor[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]55[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])+[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]StrFormat[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]O[/B], [B]H[/B], [B]L[/B], [B]C[/B], [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]SelectedValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ROC[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [B]C[/B], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ) ) )+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+Ttl+Ttle);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Plot[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [B]C[/B], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Close"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ParamColor[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Color"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]colorBlack[/B] ), [B]styleNoTitle[/B] | [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ParamStyle[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Style"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]) | [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GetPriceStyle[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]() );
[/SIZE][SIZE=1][COLOR=#969696][SIZE=1][COLOR=#969696]_SECTION_END[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]();
[/SIZE][SIZE=1][COLOR=#969696][SIZE=1][COLOR=#969696]_SECTION_BEGIN[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"SAR"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
[/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//P = ParamField( "Price field" );
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1][/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//T3MA toggle
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]T3MAT=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ParamToggle[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Moving Average"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"No|Yes"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],defaultval=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] );
T3MAP = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Param[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"T3MA Periods"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]21[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]300[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]10[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] );
[/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]function[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] T3(price,periods)
{
s = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.84[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
e1=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]EMA[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](price,periods);
e2=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]EMA[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](e1,Periods);
e3=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]EMA[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](e2,Periods);
e4=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]EMA[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](e3,Periods);
e5=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]EMA[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](e4,Periods);
e6=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]EMA[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](e5,Periods);
c1=-s*s*s;
c2=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]*s*s+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]*s*s*s;
c3=-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]6[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]*s*s-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]*s-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]*s*s*s;
c4=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]*s+s*s*s+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]*s*s;
Ti3=c1*e6+c2*e5+c3*e4+c4*e3;
[/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]return[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ti3;
}
T3MA = T3(P,T3MAP);
[/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//T3MA Display
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1][/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//T3MAB1=0;
//T3MAS1=0
[/COLOR][/SIZE][/COLOR][/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](T3MAT==[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])
{
T3MABuy = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Cross[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]C[/B],T3MA);
[/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//if(T3MABuy)
//T3MAB1=1;
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]T3MASell = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Cross[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](T3MA,[B]C[/B]);
[/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//if(T3MASell)
//T3MAS1=1;
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]T3MAcolor = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]C[/B]>=T3MA,[B]colorBlue[/B],[B]colorYellow[/B]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Plot[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](T3MA,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"\nT3MA"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],T3MAcolor,[B]styleThick[/B]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]PlotShapes[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]shapeStar[/B]*T3MABuy,[B]colorWhite[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[B]L[/B],-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]20[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]PlotShapes[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]shapeStar[/B]*T3MASell,[B]colorBlack[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[B]H[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]20[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
[/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//T3MAShape = T3MABuy * shapeHollowStar + T3MASell * shapeHollowStar;
//PlotShapes(T3MAShape, IIf(T3MABuy ,colorGreen,colorRed), 0,IIf(T3MABuy ,Low,High));
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]}
[/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//mau = TEMA(C,20);
//Plot(Ref(mau, -1),"MA20", colorGreen, styleThick) ;
//mav = TEMA(C,50);
//Plot(Ref(mav, -1),"MA50", colorGold, styleThick) ;
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1][/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]/*for automatic adjustments to the r2 critical value line use one of the periods listed above*/
/*
R2PDS=20;
R2=Correlation(Cum( 1 ),C,r2pds)*Correlation(Cum( 1 ),C,r2pds);
slope=LinRegSlope(C,r2pds);
Crit=IIf(R2PDS==5,.77,IIf(R2PDS==10,.40,IIf(R2PDS= =14,.27,IIf(R2PDS==20,.20,IIf(R2PDS==25,.16,IIf(R2 PDS==30,.13,IIf(R2PDS==50,.08,IIf(R2PDS==60,.06,II f(R2PDS==120,.03,0)))))))));
*/
//Title=WriteIf(R2>Crit,"R2 Values indicate a Trend is in place","R2 Values Indicate a Trendliess Market")+WriteIf(slope>0,"\n Slope is Positive","\n Slope is Negative");
/*
"\n \n Interpretation \n r-squared values show the percentage of movement that can be explained by linear regression. For example, if the r-squared value over 20 days is at 70%, this means that 70% of the movement of the security is explained by linear regression. The other 30% is unexplained Random noise.\n While R2 values are interesting on their own they are easier to interpret when used in conjunction with Slope. When R2 exceeds its critical Value this indicates the market is Trending, when the indicator falls below its threshold then a trend less condition may be in place. \n This table shows the values of r-squared required for A 95% confidence level at various time periods. If the r-squared value is less than the critical values shown, you should assume that prices show no statistically significant trend. \n \n R-2 Pds Critical Value(95%confidence)"+
"\n \n 5 0.77\n 10 0.40\n 14 0.27\n 20 0.20\n 25 0.16\n 30 0.13\n 50 0.08 \n 60 0.06 \n 120 0.03"
+"\n \n You may even consider opening a Short-term position opposite the prevailing trend when you observe r-squared rounding off at extreme levels. For example, if the slope is positive AND r-squared is above 0.80 then begins to turn down, you may consider selling or opening A Short position. There are numerous ways to use the linear regression outputs of r-squared and Slope in trading systems. For more detailed coverage, refer to the book The New Technical Trader by Tushar Chande and Stanley Kroll";
*/
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]acc = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Param[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Acceleration"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.001[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] );
accm = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Param[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Max. acceleration"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.06[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.001[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] );
SAR1 = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]SAR[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](acc,accm);
[/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]//Buy1 = Cross(Open, SAR(acc,accm)) AND (T3MAB1==1);
//Sell1 = Cross(SAR(acc,accm), Open ) AND (T3MAS1==1);
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]
Buy1 = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Cross[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]Open[/B], [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]SAR[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](acc,accm));
Sell1 = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Cross[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]SAR[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](acc,accm), [B]Open[/B] );
[/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ParamToggle[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"SAR"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Show|Hide"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])){
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Plot[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](SAR1,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[B]styleDots[/B]|[B]styleNoLine[/B]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]PlotShapes[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](Buy1,[B]shapeUpArrow[/B],[B]shapeNone[/B]), [B]colorYellow[/B], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]Low[/B], Offset=-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]15[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]PlotShapes[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](Buy1,[B]shapeSmallCircle[/B],[B]shapeNone[/B]), [B]colorYellow[/B], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]Low[/B], Offset=-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]28[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]PlotShapes[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](Sell1, [B]shapeDownArrow[/B],[B]shapeNone[/B]), [B]colorWhite[/B], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]High[/B], Offset=-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]15[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]PlotShapes[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](Sell1, [B]shapeSmallCircle[/B],[B]shapeNone[/B]), [B]colorWhite[/B], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]High[/B], Offset= [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]28[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
}
[/SIZE][SIZE=1][COLOR=#969696][SIZE=1][COLOR=#969696]_SECTION_END[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]();
messageboard = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ParamToggle[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Message Board"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Show|Hide"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
exitlong = Sell1;
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]PlotShapes[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](exitlong * [B]shapeDownArrow[/B], [B]colorBlack[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[B]H[/B],-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]10[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
exitshort = Buy1;
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]PlotShapes[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](exitshort * [B]shapeUpArrow[/B], [B]colorBlack[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[B]L[/B],-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]15[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
[B]Buy[/B] = exitshort;
[B]Sell[/B] = exitlong;
[B]Buy[/B] = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ExRem[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]Buy[/B],[B]Sell[/B]);
[B]Sell[/B] = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ExRem[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]Sell[/B],[B]Buy[/B]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]AlertIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [B]Buy[/B], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"BUY @ "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] + [B]C[/B], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] );
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]AlertIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [B]Sell[/B], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"SELL @ "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] + [B]C[/B], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] );
[/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]for[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](i=[B]BarCount[/B]-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];i>[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];i--)
{
[/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]Buy[/B][i] == [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])
{
entry = [B]C[/B][i];
sig = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"BUY"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
sl = sar1[i];
tar1 = entry + (entry * .0056);
tar2 = entry + (entry * .0116);
tar3 = entry + (entry * .0216);
bars = i;
i = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
}
[/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]Sell[/B][i] == [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])
{
sig = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"SELL"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
entry = [B]C[/B][i];
sl = SAR1[i];
tar1 = entry - (entry * .0056);
tar2 = entry - (entry * .0116);
tar3 = entry - (entry * .0216);
bars = i;
i = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
}
}
Offset = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]20[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
Clr = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](sig == [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"BUY"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]colorLime[/B], [B]colorRed[/B]);
ssl = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](bars == [B]BarCount[/B]-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], sar1[[B]BarCount[/B]-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]], [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Ref[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](SAR1, -[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]));
sl = ssl[[B]BarCount[/B]-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]];
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Plot[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LineArray[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](bars-Offset, tar1, [B]BarCount[/B], tar1,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]), [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], Clr, [B]styleLine[/B]|[B]styleDots[/B], [B]Null[/B], [B]Null[/B], Offset);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Plot[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LineArray[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](bars-Offset, tar2, [B]BarCount[/B], tar2,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]), [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], Clr, [B]styleLine[/B]|[B]styleDots[/B], [B]Null[/B], [B]Null[/B], Offset);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Plot[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LineArray[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](bars-Offset, tar3, [B]BarCount[/B], tar3,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]), [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], Clr, [B]styleLine[/B]|[B]styleDots[/B], [B]Null[/B], [B]Null[/B], Offset);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Plot[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LineArray[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](bars-Offset, sl, [B]BarCount[/B], sl,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]), [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]colorDarkRed[/B], [B]styleLine[/B]|[B]styleLine[/B], [B]Null[/B], [B]Null[/B], Offset);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Plot[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LineArray[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](bars-Offset, entry, [B]BarCount[/B], entry,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]), [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]colorGreen[/B], [B]styleLine[/B]|[B]styleLine[/B], [B]Null[/B], [B]Null[/B], Offset);
[/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]for[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (i=bars; i <[B]BarCount[/B];i++)
{
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]PlotText[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+sig+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"@"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+entry, [B]BarCount[/B]+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],entry,[B]Null[/B],[B]colorBlue[/B]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]PlotText[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"T1@"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+tar1,[B]BarCount[/B]+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],tar1,[B]Null[/B],Clr);[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]PlotText[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"T2@"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+tar2,[B]BarCount[/B]+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],tar2,[B]Null[/B],Clr);[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]PlotText[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"T3@"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+tar3,[B]BarCount[/B]+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],tar3,[B]Null[/B],Clr);
}
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]printf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Last "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] + sig + [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" Signal came "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] + ([B]BarCount[/B]-bars) + [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" bars ago"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]printf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] + sig + [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" @ : "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] + entry + [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"\nStop Loss : "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] + sl + [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" ("[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] + [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]WriteVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](sig == [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"SELL"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],entry-sl,sl-entry), [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2.2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]) + [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]")"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+ [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"\nTarget_1 : "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] + tar1 + [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"\nTarget_2 : "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] + tar2 + [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"\nTarget_3 : "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] + tar3);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]printf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"\nCurrent P/L : "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] + [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]WriteVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](sig == [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"BUY"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],([B]C[/B]-entry),(entry-[B]C[/B])),[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2.2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]));
[/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (messageboard == [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] )
{
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GfxSelectFont[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Tahoma"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]9[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]100[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] );
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GfxSetBkMode[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] );
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GfxSetTextColor[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [B]colorWhite[/B] );
[/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ( sig ==[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"BUY"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])
{
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GfxSelectSolidBrush[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [B]colorBlue[/B] ); [/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]// this is the box background color
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]}
[/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]else
[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]{
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GfxSelectSolidBrush[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [B]colorRed[/B] ); [/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]// this is the box background color
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]}
pxHeight = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Status[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"pxchartheight"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ) ;
xx = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Status[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"pxchartwidth"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
Left = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1100[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
width = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]310[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
x = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
x2 = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]210[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
y = pxHeight;
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GfxSelectPen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [B]colorGreen[/B], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]); [/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]// broader color
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GfxRoundRect[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( x, y - [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]163[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], x2, y , [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]7[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]7[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ) ;
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GfxTextOut[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( ( [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" Message Box "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]),[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]88[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],y-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]165[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GfxTextOut[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( ([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]),[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]27[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],y-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]160[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GfxTextOut[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( ([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Last "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] + sig + [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" Signal came "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] + ([B]BarCount[/B]-bars-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]) * [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Interval[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]()/[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]60[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] + [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" mins ago"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]), [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]13[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], y-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]140[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]) ; [/SIZE][SIZE=1][COLOR=#008000][SIZE=1][COLOR=#008000]// The text format location
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GfxTextOut[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( ([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] + [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]WriteIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](sig ==[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"BUY"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],sig + [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" @ "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],sig + [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" @"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]) + [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" : "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] + entry), [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]13[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], y-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]120[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GfxTextOut[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( ([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Trailing SL : "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] + sl + [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" ("[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] + [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]WriteVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](sig == [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"SELL"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],entry-sl,sl-entry), [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2.2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]) + [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]")"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]), [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]13[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], y-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]100[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GfxTextOut[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( ([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"TGT:1 : "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] + tar1), [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]13[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], y -[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]80[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GfxTextOut[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( ([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"TGT:2 : "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] + tar2), [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]13[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],y-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]60[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GfxTextOut[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( ([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"TGT:3 : "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] + tar3), [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]13[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],y-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]40[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GfxTextOut[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( ([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Current P/L : "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] + [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]WriteVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](sig == [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"BUY"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],([B]C[/B]-entry),(entry-[B]C[/B])),[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2.2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])), [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]88[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], y-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]22[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);;
}
[/SIZE][SIZE=1][COLOR=#969696][SIZE=1][COLOR=#969696]_SECTION_BEGIN[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"ADX"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
uptrend=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]PDI[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]()>[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]MDI[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]()[B]AND[/B] [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Signal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]()<[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]MACD[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]();
downtrend=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]MDI[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]()>[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]PDI[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]()[B]AND[/B] [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Signal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]()>[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]MACD[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]();
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Plot[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"ADX"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( uptrend, [B]colorGreen[/B], [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( downtrend, [B]colorRed[/B], [B]colorBlack[/B] )), [B]styleOwnScale[/B]|[B]styleArea[/B]|[B]styleNoLabel[/B], -[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]100[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] );
[/SIZE][SIZE=1][COLOR=#969696][SIZE=1][COLOR=#969696]_SECTION_END[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]();
[B]GraphXSpace[/B]=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];[/SIZE]
[SIZE=1][/SIZE]
[SIZE=1]2.düzelti,lmiş hali ufak nüans büyük birşey yok
[/SIZE]
[URL="http://666kb.com/i/c3h2v1kdlc8mdbq69.jpg"][B]http://666kb.com/i/c3h2v1kdlc8mdbq69.jpg[/B][/URL]
system uzadı bakalım nereye kadar:yü:
sl noktam 200 point aşağısıdır:dü:
[quote=engin sözmen;403986]
[SIZE=1]2.düzelti,lmiş hali ufak nüans büyük birşey yok
[/SIZE][/quote]
ammada beleşçi oldum ha.dng
uğraştırdım TEŞEKKÜR EDERİM.brv
Benim 5 lik 575 den longdaydı 775 den flatladı bilginize
[quote=ordi;403987][URL="http://666kb.com/i/c3h2v1kdlc8mdbq69.jpg"][B]http://666kb.com/i/c3h2v1kdlc8mdbq69.jpg[/B][/URL]
system uzadı bakalım nereye kadar:yü:
sl noktam 200 point aşağısıdır:dü:[/quote]
[quote=engin sözmen;403989]Benim 5 lik 575 den longdaydı 775 den flatladı bilginize[/quote]
yazmayı unutmuşum system 30dk;)
70750-70900 arası dikenli bölge bende:confused:
hem yukarı hem aşağı hızlı hareket edebilir yoksa dikenlere fazla yün bırakır ki; pala değil yün, tüy vermez:..:
[quote=ordi;403978]sn.kokohan23 ikinci verdiğiniz de birincisi gibi çalışmadı.
Sn.enginsözmen'in birinci verdiğinizi düzeltilmiş şekildeki ise çalışıyor.
Indikler için de ayrıca teşekkür ederim.
Bende mi hata var?
Hata mesajlarından bir örnek
r2=correlation(cum( 1 ),c,r2pds)*correlation(cum( 1 ),c,r2pds);
slope=linregslope(c,r2pds);
crit=ııf(r2pds==5,.77,ııf(r2pds==10,.40,ııf(r2pds= =
---------------------------------------------------^
error 32.
Syntax error, unexpected '='. ıs there semicolon missing at the[/quote]
engin kardeşimiz düzeltmiş.belki amibroker versiyon farkından kaynaklanıyordur.bende çalışıyor.
Maşallah foruma katılım çok iyi.canımız sıkılıyordu yahu:)
[IMG]http://img28.imageshack.us/img28/3481/63991100.png[/IMG]
Faiz Oranı Bildirisi 1.00%(açıklanan) 1.00%(beklenti) 1.00%(önceki)
[quote=thebaboli;403998]faiz oranı bildirisi 1.00%(açıklanan) 1.00%(beklenti) 1.00%(önceki)[/quote]
esas draghinin basın toplantısı önemli.trichet her konuştuğunda düşüyordu draghide yükselliyor:)
mor..............70.700
kave............70.925
[quote=saraylı;404001]mor..............70.700
kave............70.925[/quote]
Cahilliğime verin mor ve kave nin anlamını öğrenebilir miyim?
[QUOTE=ordi;403978]Sn.kokohan23 ikinci verdiğiniz de birincisi gibi çalışmadı.
Sn.EnginSözmen'in birinci verdiğinizi düzeltilmiş şekildeki ise çalışıyor.
indikler için de ayrıca TEŞEKKÜR EDERİM.
Bende mi hata var?
hata mesajlarından bir örnek
R2=Correlation(Cum( 1 ),C,r2pds)*Correlation(Cum( 1 ),C,r2pds);
slope=LinRegSlope(C,r2pds);
Crit=IIf(R2PDS==5,.77,IIf(R2PDS==10,.40,IIf(R2PDS= =
---------------------------------------------------^
Error 32.
Syntax error, unexpected '='. Is there semicolon missing at the[/QUOTE]
r2pds= = kısmında eşitlikler arasındaki boşluğu silerseniz düzelir bende iki formulde çalışıyor. yani r2pds== olması lazım formulun bazı yerlerinde boşluklar var, hata veren yerlerdekilerini silerseniz düzelir.
MOR 0.5LİK EMABAND KAHVE 0.8 LİK EMABAND.EMABAND NE DİYECEK OLURSAN SARAYLI HOCAMIZA AİT BİR İNDİKATÖR.FORMÜLÜ AŞAĞIDA Q11:= 3+18*Abs( RSquared( Typical() , 30
) ) ;
Q1:= Int(63/( Abs(Q11)));
Q2:=Input("PERIOD",0.001,100,1);
Q3:=Q2/100;
Q21:=2/(Q1+1);
Q31:=1-Q21;
Q4:=C*Q21 +Q31* PREVIOUS ;
Q5:=If((Q4*(1-Q3))>PREV,Q4*(1-Q3),If((Q4*(1+Q3))<PREV,Q4*(1+Q3),PREV));
Int(Q5/0.025+0.50)*0.025;
şov başlıyor:)
Kesin 3.ltro yok haberini aldı birileri
Draghinin konuşması bloomberg ht de canlı olarak 15.30 da
Endeks düşerken hacim artıyor.yükselirken azalıyor. Dikkat
[quote=thebaboli;404003]Cahilliğime verin mor ve kave nin anlamını öğrenebilir miyim?[/quote]
[quote=kokohan23;404005]MOR 0.5LİK EMABAND KAHVE 0.8 LİK EMABAND.EMABAND NE DİYECEK OLURSAN SARAYLI HOCAMIZA AİT BİR İNDİKATÖR.FORMÜLÜ AŞAĞIDA Q11:= 3+18*Abs( RSquared( Typical() , 30
) ) ;
Q1:= Int(63/( Abs(Q11)));
Q2:=Input("PERIOD",0.001,100,1);
Q3:=Q2/100;
Q21:=2/(Q1+1);
Q31:=1-Q21;
Q4:=C*Q21 +Q31* PREVIOUS ;
Q5:=If((Q4*(1-Q3))>PREV,Q4*(1-Q3),If((Q4*(1+Q3))<PREV,Q4*(1+Q3),PREV));
Int(Q5/0.025+0.50)*0.025;[/quote]
baboli bak kokohan yanıtlamış,
formüller topiğine gir,orda yazıyo son bölümlere bak,seni yönlendirecek Solotürk sistemine...:)
Haber <-------------------------> Açıklanan<---->Beklenti<---->Önceki
Birim Emek Maliyetleri (çeyreklik) <---> 2,0%<------->2.8%<------>2.8%
Devam eden İşsizlik Başvuruları <-----> 3276K<------>3311K<----->3315K
İstihdam Talepleri <------------------> 365K<-------->380K<------>388K
Tarım Dışı Üretkenlik (çeyreklik) <-----> -0,5%<------>-0.5%<------>0.9%
Yıllık olarak incelediğimde sene sonuna kadar 58000 altını göreceğiz gibi geliyor bana
flat 5 liğide shortlattı güzel
[quote=engin sözmen;404034]Yıllık olarak incelediğimde sene sonuna kadar 58000 altını göreceğiz gibi geliyor bana[/quote]
engin doğrusun,
benim[B] ew hesaplarıma göre ise,[COLOR=magenta]eğer dalga yapım doğruysa[/COLOR],sene sonuna kadar vadeli 43.500 civarını görebilir[/B],görmeyebilir de tabi...::::D
ama görmesi daha mantıklı yani...;)
Bu almanlar bizden daha beter yahu.adamlar bastı mı tam basıyo:)
Buralardan esaslı mal vermeleri lazım
eğer aşağı gidiş devam edecekse bu 70-71 bölgesi ,ki iyi destek olarak çalışmakta,tüm yukarı tepkkilerde sağlam direnç olacaktır...bunu not aldım...;)
burayı kırmakta zorlanıyor..şu ana kadar..:rolleyes:
S&P, TURK EXIMBANK'IN GORUNUMUNU POZITIF'TEN DURAGAN'A CEVIRDI
-MATRIKS-
Biz adamları tanımıyoruz ama onlar bizi tanıyor galiba.
Turkcellin yeni reklamı harika olmuş:)harvardlı emily ile harranlı emine..
önümüzdeki haftasonu fransa ve yunanistan seçimleri var.