topiğe katkı bekliyorum:;)
anonim,engin sözmen,halojen,matador,selam,kokohan,taka....:)))
ve ismini hatırlayamadığım değerli kardeşlerden..
:rolleyes:
yoksa hakkat solotürk oluyo...:D::::D
Printable View
topiğe katkı bekliyorum:;)
anonim,engin sözmen,halojen,matador,selam,kokohan,taka....:)))
ve ismini hatırlayamadığım değerli kardeşlerden..
:rolleyes:
yoksa hakkat solotürk oluyo...:D::::D
[quote=saraylı;403895]topiğe katkı bekliyorum:;)
anonim,engin sözmen,halojen,matador,selam,kokohan,taka....:)))
ve ismini hatırlayamadığım değerli kardeşlerden..
:rolleyes:
yoksa hakkat solotürk oluyo...:D::::D[/quote]70200 uzun istop-70700 direnç ve pivot bugün için.
[B]70.700[/B]-71.275
------------------
[B]69.700[/B]-69.125-68.125
açılışla beraber 70.700 direnci test ediliyor...eğer yukarı kırılmazsa aşağı trende uygun destekler test edilir...
:eek:
pala ağamın kuralı destekler kırılmak için,dirençler geçilmek için vardır.
1923 Sistemi ise
27/4 te 72.900 den beri satta..
şu anda kd=71.200 de...
:)
Saraylı hocam benim 30 luk 72750 beri shortta daha
Enflasyon nisan ayında %1.52 oranında artış gösterdi. Yıllık enflasyon %11.14 olarak açıklandı.
[URL="http://bit.ly/c25MCx]"][url=http://bit.ly/c25MCx][/URL][img]http://g1205.hizliresim.com/x/3/57gtz.jpg[/img][/url]
70700 pivot drenç var
aşağıda 69700 destek
[url=http://bit.ly/c25MCx][img]http://g1205.hizliresim.com/x/3/57gv9.jpg[/img][/url],
Renko son durum
[quote=thebaboli;403906]Enflasyon nisan ayında %1.52 oranında artış gösterdi. Yıllık enflasyon %11.14 olarak açıklandı.[/quote]
bu tüfe galiba..
üfe ise %7.65 açıklanmış,düşüş var..tüfe çıkarken,üfe düşünce önümüzdeki dönem enflasyon aşağı çekilebilir diye hatırlıyorum...yaw herşeye zam geliyo,üfe nası düşüyo,anlamıyorum??:eek::confused:
makrocu saraylı...:..::..:
70700 kırılır mı sizce?
[URL="http://bit.ly/c25MCx]"][url=http://bit.ly/c25MCx][/URL][img]http://g1205.hizliresim.com/x/3/57h1v.jpg[/img][/url]
70175 aşağıda 70975 yukarda
[QUOTE=saraylı;403895]topiğe katkı bekliyorum:;)
anonim,engin sözmen,halojen,[B]matador[/B],selam,kokohan,taka....:)))
ve ismini hatırlayamadığım değerli kardeşlerden..
:rolleyes:
yoksa hakkat solotürk oluyo...:D::::D[/QUOTE]
abi analizler daha iyi görünsün, mesajlar arası kaynamasın diye pek yazmıyorum ama sen istedikden sonra boynumuz kıldan ince.
genel algım şu yönde: 71100 altında kalan piyasa sort ağırlıklı olur. 71100 üzeirnde şahsen logn kovalamaya başlarım. yeniden 70300 altına inen piyasa ise 69xxx lere göz kırpar. benim tercihim bugün 69xxx in yanacağı ancak yinede SL um 71100 üzeridir.
şu ana kadarki çıkışı tepki olarak görüyorum. herhangi bir b, yada ii vs. olabilir.
Hocam renkolara sadık kalarak ama portföyümün yarısını da poz. Kapat tekrar aç şeklinde 1.dklık grafik macda göre yapıyorum.şimdilik iyi gidiyor.arkadaşlara da tavsiye ederim.dikkat edilmesi gereken zararına pozisyon açmamak ve renkoların aksi yönüne pozisyon açmamak.
Bugün içinde 71100 noktası önemli.oraya kadar tepki sonra aşağı bekliyorum.tabii dragdi 3.ltro açıklamazsa.draghi açıklama yaparken flate geçmeyi düşünüyorum.
Garn max 6.46 ya kadar hareket bekliyorum.
şu anda macdlarda 5 dkya geçtim.çizgi içeri girerse kar alırım.
[quote=matador38;403917]abi analizler daha iyi görünsün, mesajlar arası kaynamasın diye pek yazmıyorum ama sen istedikden sonra boynumuz kıldan ince.
genel algım şu yönde: 71100 altında kalan piyasa sort ağırlıklı olur. 71100 üzeirnde şahsen logn kovalamaya başlarım. yeniden 70300 altına inen piyasa ise 69xxx lere göz kırpar. benim tercihim bugün 69xxx in yanacağı ancak yinede SL um 71100 üzeridir.
şu ana kadarki çıkışı tepki olarak görüyorum. herhangi bir b, yada ii vs. olabilir.[/quote]
est matador,:o,sen yaz abim,
ben de tek başıma yazınca ,canım sıkılıyo valla...ülen acaba herkes sıkıldı mı falan diye düşünüyorum bu sefer...?herkes fikrini özgürce yazsın bence,doğru çıkar çıkmaz ,hiç önemi yok,ben de diyorum bişi,bazen çıkmıyo...:o...bu gayet doğal...;)
[url=http://bit.ly/c25MCx][img]http://g1205.hizliresim.com/x/3/57hz2.png[/img][/url]
[quote=saraylı;403924]est matador,:o,sen yaz abim,
ben de tek başıma yazınca ,canım sıkılıyo valla...ülen acaba herkes sıkıldı mı falan diye düşünüyorum bu sefer...?herkes fikrini özgürce yazsın bence,doğru çıkar çıkmaz ,hiç önemi yok,ben de diyorum bişi,bazen çıkmıyo...:o...bu gayet doğal...;)[/quote]
hocam topikte kirlilik olmasın diye yazmıyoduk valla.kim tutar bizi bundan sonra:)
[quote=matador38;403917] 71100 altında kalan piyasa sort ağırlıklı olur. 71100 üzeirnde şahsen logn kovalamaya başlarım. yeniden 70300 altına inen piyasa ise 69xxx lere göz kırpar. benim tercihim bugün 69xxx in yanacağı ancak yinede SL um 71100 üzeridir.
şu ana kadarki çıkışı tepki olarak görüyorum. herhangi bir b, yada ii vs. olabilir.[/quote]
süper analiz....brv.brv
[quote=saraylı;403927]süper analiz....brv.brv[/quote]
71100 dünkü düşüşün %62 geri alım bölgesi.onun için çok önemli.ben de bu analize katılıyorum.
Burdan dönüş olursa ilk durak floor pıvotsa göre ilk duraklar 69700-69125
[quote=kokohan23;403926]hocam topikte kirlilik olmasın diye yazmıyoduk valla.kim tutar bizi bundan sonra:)[/quote]
yazın abim yaw,rahat olun..:).konuyla ilgili hiçbirşey kirlilik yaratmaz...;)
yoksa tek sistem uygulamasına döner topik,ki o da pek sağlıklı olmaz...fikirler çeşitli olsun,isteyen istediğini uygular...isteyen beğenmez..normali bu yani...:)))
kimse de piyasayla ilgili çarşaflamaktamn,yanılmaktan korkmasın...çünkü zaten piyasa herkesi yanıltır...:cool:zor bi iş bu...hem de çok...:)
[QUOTE=kokohan23;403929]71100 dünkü düşüşün %62 geri alım bölgesi.onun için çok önemli.ben de bu analize katılıyorum.[/QUOTE]
yanlış anlaşılmasın 71100 e gider demiyorum. orayı geçerse ben long kovalarım diyorum. gideceği ihtimali bence cok az. 70875 günün tepesi oldu yada son bir 950 denemesi ile olucak ama gün içinde 69xxx görülecek şeklinde bir beklentideyim. haa şunuda yazayım beklentilerim genelde tutmaz :::
AMİBROKER KULLANANLAR STOPLOSS VE TAKE PROFİT NOKTALARINI AŞAĞIDAKİ VERDİĞİM SİSTEMİ KURUP KULLANABİLİRLER. SetChartBkColor(64);
PctVlt=(ATR(14)/C)*100;
PK=IIf(PctVlt<0.5,Peak(Close,0.5,1),
IIf( PctVlt>=0.5 AND PctVlt< 1.0 ,Peak(Close,0.70,1),
IIf( PctVlt>=1.0 AND PctVlt< 1.5 ,Peak(Close,0.90,1),
IIf( PctVlt>=1.5 AND PctVlt< 2.0 ,Peak(Close,1.10,1),
IIf( PctVlt>=2.0 AND PctVlt< 2.5 ,Peak(Close,1.30,1),
IIf( PctVlt>=2.5 AND PctVlt< 3.0 ,Peak(Close,1.50,1),
IIf( PctVlt>=3.0 AND PctVlt< 3.5 ,Peak(Close,1.70,1),
IIf( PctVlt>=3.5 AND PctVlt< 4.0 ,Peak(Close,2.00,1),
Peak(Close,2.20,1) ))))))));
TGH=IIf(PctVlt<0.5,Trough(Close,0.5,1),
IIf( PctVlt>=0.5 AND PctVlt< 1.0 ,Trough(Close,0.75,1),
IIf( PctVlt>=1.0 AND PctVlt< 1.5 ,Trough(Close,1.00,1),
IIf( PctVlt>=1.5 AND PctVlt< 2.0 ,Trough(Close,1.25,1),
IIf( PctVlt>=2.0 AND PctVlt< 2.5 ,Trough(Close,1.50,1),
IIf( PctVlt>=2.5 AND PctVlt< 3.0 ,Trough(Close,1.75,1),
IIf( PctVlt>=3.0 AND PctVlt< 3.5 ,Trough(Close,2.00,1),
IIf( PctVlt>=3.5 AND PctVlt< 4.0 ,Trough(Close,2.25,1),
Trough(Close,2.50,1) ))))))));
Sens=IIf(PctVlt<0.5,0.5,
IIf( PctVlt>=0.5 AND PctVlt< 1.0 ,0.75,
IIf( PctVlt>=1.0 AND PctVlt< 1.5 ,1.00,
IIf( PctVlt>=1.5 AND PctVlt< 2.0 ,1.25,
IIf( PctVlt>=2.0 AND PctVlt< 2.5 ,1.50,
IIf( PctVlt>=2.5 AND PctVlt< 3.0 ,1.75,
IIf( PctVlt>=3.0 AND PctVlt< 3.5 ,2.00,
IIf( PctVlt>=3.5 AND PctVlt< 4.0 ,2.25,
2.50 ))))))));
Color=IIf(BarsSince(Cross(C,Ref(PK,-1)))<BarsSince(Cross(Ref(TGH,-1),C)),colorBrightGreen,colorRed);
Plot(C,"Chaloke.com Peak-Trough",Color,styleCandle);
DayH = TimeFrameGetPrice("H", inDaily, -1); DayHI = LastValue (DayH,1);
DayL = TimeFrameGetPrice("L", inDaily, -1); DayLI = LastValue (DayL,1);
DayC = TimeFrameGetPrice("C", inDaily, -1);
DayO = TimeFrameGetPrice("O", inDaily);
DayH2= TimeFrameGetPrice("H", inDaily, -2); DayH2I = LastValue (DayH2,1);
DayL2= TimeFrameGetPrice("L", inDaily, -2); DayL2I = LastValue (DayL2,1);
DayH3= TimeFrameGetPrice("H", inDaily, -3); DayH3I = LastValue (DayH3,1);
DayL3= TimeFrameGetPrice("L", inDaily, -3); DayL3I = LastValue (DayL3,1);
numbars = LastValue(Cum(Status("barvisible")));
hts = -33.5;
YHL = ParamToggle("Yesterday HI LO","Show|Hide",1);
if(YHL==1) {
Plot(DayL,"YL",colorTurquoise,styleNoLine|styleNoLine|styleNoRescale|styleNoTitle);
Plot(DayH,"YH",colorTurquoise,styleNoLine|styleNoLine|styleNoRescale|styleNoTitle);
PlotText(" YH " , LastValue(BarIndex())-(numbars/Hts), DayHI, colorTurquoise);
PlotText(" YL " , LastValue(BarIndex())-(numbars/Hts), DayLI, colorTurquoise);
}
TDBHL = ParamToggle("2/3Days before HI LO","Show|Hide",0);
if(TDBHL==1) {
}
PP = (DayL + DayH + DayC)/3; PPI = LastValue (PP,1);
R1 = (PP * 2) - DayL; R1I = LastValue (R1,1);
S1 = (PP * 2) - DayH; S1I = LastValue (S1,1);
R2 = PP + R1 - S1; R2I = LastValue (R2,1);
S2 = PP - R1 + S1; S2I = LastValue (S2,1);
R3 = PP + R2 - S1; R3I = LastValue (R3,1);
S3 = PP - R2 + S1; S3I = LastValue (S3,1);
ppl = ParamToggle("Pivot Levels","Show|Hide",1);
if(ppl==1) {
Plot(PP, "PP",colorYellow,styleNoLine|styleNoLine|styleNoRescale|styleNoTitle);
PlotText(" Pivot ", LastValue(BarIndex())-(numbars/Hts), PPI, colorYellow);
}
rg = (DayH - DayL);
H5=DayC+1.1*rg; H5I = LastValue (H5,1);
H4=DayC+1.1*rg/2; H4I = LastValue (H4,1);
H3=DayC+1.1*rg/4; H3I = LastValue (H3,1);
H2=DayC+1.1*rg/6; H2I = LastValue (H2,1);
H1=DayC+1.1*rg/12; H1I = LastValue (H1,1);
L1=DayC-1.1*rg/12; L1I = LastValue (L1,1);
L2=DayC-1.1*rg/6; L2I = LastValue (L2,1);
L3=DayC-1.1*rg/4; L3I = LastValue (L3,1);
L4=DayC-1.1*rg/2; L4I = LastValue (L4,1);
L5=DayC-1.1*rg; L5I = LastValue (L5,1);
pcl = ParamToggle("Camerilla Levels","Show|Hide",0);
if(pcl==1) {
Plot(H5,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
Plot(H4,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
Plot(H3,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
Plot(H2,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
Plot(H1,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
Plot(L1,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
Plot(L2,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
Plot(L3,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
Plot(L4,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
Plot(L5,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
PlotText(" H5 = " , LastValue(BarIndex())-(numbars/Hts), H5I +0.05, colorRose);
PlotText(" H4 = " , LastValue(BarIndex())-(numbars/Hts), H4I +0.05, colorRose);
PlotText(" H3 = " , LastValue(BarIndex())-(numbars/Hts), H3I +0.05, colorRose);
PlotText(" H2 = " , LastValue(BarIndex())-(numbars/Hts), H2I +0.05, colorRose);
PlotText(" H1 = " , LastValue(BarIndex())-(numbars/Hts), H1I +0.05, colorRose);
PlotText(" L1 = " , LastValue(BarIndex())-(numbars/Hts), L1I +0.05, colorRose);
PlotText(" L2 = " , LastValue(BarIndex())-(numbars/Hts), L2I +0.05, colorRose);
PlotText(" L3 = " , LastValue(BarIndex())-(numbars/Hts), L3I +0.05, colorRose);
PlotText(" L4 = " , LastValue(BarIndex())-(numbars/Hts), L4I +0.05, colorRose);
PlotText(" L5 = " , LastValue(BarIndex())-(numbars/Hts), L5I +0.05, colorRose);
}
THL = ParamToggle("Todays Hi Lo","Show|Hide",1);
if(THL==1) {
isRth = TimeNum() >= 084500 & TimeNum() <= 085959;
isdRth = TimeNum() >= 084500 & TimeNum() <= 160000;
aRthL = IIf(isRth, L, 1000000);
aRthH = IIf(isdRth, H, Null);
aRthLd = IIf(isdRth, L, 1000000);
DayH = TimeFrameCompress( aRthH, inDaily, compressHigh );
DayH = TimeFrameExpand( DayH, inDaily, expandFirst );
DayL = TimeFrameCompress( aRthLd, inDaily, compressLow );
DayL = TimeFrameExpand( DayL, inDaily, expandFirst );
Bars = BarsSince(TimeNum() >= 94500 AND TimeNum() < 095959);
x0 = BarCount-LastValue(Bars);
x1 = BarCount-1;
DayHline=LineArray(x0,LastValue(DayH),x1,LastValue (DayH),0);
DayLline=LineArray(x0,LastValue(DayL),x1,LastValue (DayL),0);
DayHlineI = LastValue (DayHline,1);
DayLlineI = LastValue (DayLline,1);
Plot(DayHline,"DayHigh",colorYellow,styleNoLine|styleNoRescale|styleNoTitle);
Plot(DayLline,"DayLow",colorYellow,styleNoLine|styleNoRescale|styleNoTitle);
PlotText(" Day High " , LastValue(BarIndex())-(numbars/Hts), DayHlineI +0.05, colorYellow);
PlotText(" Day Low " , LastValue(BarIndex())-(numbars/Hts), DayLlineI +0.05, colorYellow);
}
RSIperiod = 5;
Percent = 5;
EMAperiod = 5;
HHVperiod = 5;
NumLine = 1;
Base = DEMA(RSI(RSIperiod),EMAperiod);
for( i = 1; i <= numline; i++ )
{
ResBase = LastValue(Peak(Base,Percent,i));
SupBase = LastValue(Trough(Base,Percent,i));
Plot(ValueWhen( ResBase==Base, HHV(H,HHVperiod) ), "Resist Level", colorPink,
styleDots);
Plot(ValueWhen( supbase==Base, LLV(L,HHVperiod) ), "Support Level", colorBlue,
styleDots);
}
Title = Name() + "; " + Date() + ": Support & Resistance Levels using RSI: " +
"Num lines
="+WriteVal(numline,1) ;
P6=Param("Trailing Stop Risk",2.5,2,3.5,0.1);
P7=Param("Trailing Stop LookBack",14,5,25,1);
P8=Param("Trailing Stop PrevLow Switch",0,0,1,1);
PrevLow=IIf(P8==1, Ref(C,-TroughBars(C,5,1)) ,Null);
Plot(PrevLow,"",colorRed);
MyTotalPort = Param("MyTotalPort",1000000,10000,10000000,100000) ;
AcceptableRisk = Param("AcceptableRisk",0.5,0.1,3,0.1);
BarsFromStart = BarsSince(Cross(C,Ref(PK,-1))AND Ref(Color,-1)==colorRed) ;
InitialStopLoss =Ref( H - P6*ATR(P7),-BarsFromStart);
PositionSizing = 0.01*AcceptableRisk*MyTotalPort/( C - InitialStopLoss );
Plot(IIf( HHV(H - P6*ATR(P7),BarsFromStart+1) <C ,HHV(H - P6*ATR(P7),BarsFromStart+1),Null) ,"",colorCustom12,1);
PlotShapes(shapeDownArrow*Cross(Ref(HHV(H - P6*ATR(P7),BarsFromStart+1),-1),C),colorBlack,0,H,Offset=-43);
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title =EncodeColor(colorBrightGreen)+ StrFormat("{{NAME}} - {{INTERVAL}} - {{DATE}} - "+ EncodeColor(colorYellow)+"Open = "+ EncodeColor(colorYellow) +"%g "+ EncodeColor(colorBrightGreen)+"High = "+ EncodeColor(colorBrightGreen) +"%g - "+ EncodeColor(colorRed)+"Low = "+ EncodeColor(colorRed) +"%g "+ EncodeColor(colorYellow) +"Close = "+ EncodeColor(colorYellow) +" %g &nbs p; ; (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
" - " + Date() +" - ";
Odd=13;
CoefOdd=round(Odd/2);
Even=12;
Coefeven=Even/2;
Coefeven2=Coefeven+1;
CongestionPercent=2.8;
TriangularOdd=MA(MA(C,CoefOdd),CoefOdd);
TriangularEven=MA(MA(C,Coefeven),Coefeven2);
finalMov_avg=IIf(Odd > even,triangularOdd,TriangularEven);
Color=colorBrightGreen;
tickercolor=colorBlack;
Plot(finalMov_avg,"",IIf(C < finalmov_avg,colorRed,Color),styleDots|styleThick) ;
farback=Param("How Far back to go",200,12,30,1);
nBars = Param("Number of bars", 25, 1, 30, 1);
aHPivs = H - H;
aLPivs = L - L;
aHPivHighs = H - H;
aLPivLows = L - L;
aHPivIdxs = H - H;
aLPivIdxs = L - L;
nHPivs = 0;
nLPivs = 0;
lastHPIdx = 0;
lastLPIdx = 0;
lastHPH = 0;
lastLPL = 0;
curPivBarIdx = 0;
aHHVBars = HHVBars(H, nBars);
aLLVBars = LLVBars(L, nBars);
aHHV = HHV(H, nBars);
aLLV = LLV(L, nBars);
aVisBars = Status("barvisible");
nLastVisBar = LastValue(Highest(IIf(aVisBars, BarIndex(), 0)));
_TRACE("Last visible bar: " + nLastVisBar);
curBar = (BarCount-1);
curTrend = "";
if (aLLVBars[curBar] <
aHHVBars[curBar]) {
curTrend = "D";
}
else {
curTrend = "U";
}
for (i=0; i<farback; i++) {
curBar = (BarCount - 1) - i;
if (aLLVBars[curBar] < aHHVBars[curBar]) {
if (curTrend == "U") {
curTrend = "D";
curPivBarIdx = curBar - aLLVBars[curBar];
aLPivs[curPivBarIdx] = 1;
aLPivLows[nLPivs] = L[curPivBarIdx];
aLPivIdxs[nLPivs] = curPivBarIdx;
nLPivs++;
}
} else {
if (curTrend == "D") {
curTrend = "U";
curPivBarIdx = curBar - aHHVBars[curBar];
aHPivs[curPivBarIdx] = 1;
aHPivHighs[nHPivs] = H[curPivBarIdx];
aHPivIdxs[nHPivs] = curPivBarIdx;
nHPivs++;
}
}
}
curBar = (BarCount-1);
candIdx = 0;
candPrc = 0;
lastLPIdx = aLPivIdxs[0];
lastLPL = aLPivLows[0];
lastHPIdx = aHPivIdxs[0];
lastHPH = aHPivHighs[0];
if (lastLPIdx > lastHPIdx) {
candIdx = curBar - aHHVBars[curBar];
candPrc = aHHV[curBar];
if (
lastHPH < candPrc AND
candIdx > lastLPIdx AND
candIdx < curBar) {
aHPivs[candIdx] = 1;
for (j=0; j<nHPivs; j++) {
aHPivHighs[nHPivs-j] = aHPivHighs[nHPivs-
(j+1)];
aHPivIdxs[nHPivs-j] = aHPivIdxs[nHPivs-(j+1)];
}
aHPivHighs[0] = candPrc ;
aHPivIdxs[0] = candIdx;
nHPivs++;
}
} else {
candIdx = curBar - aLLVBars[curBar];
candPrc = aLLV[curBar];
if (
lastLPL > candPrc AND
candIdx > lastHPIdx AND
candIdx < curBar) {
aLPivs[candIdx] = 1;
for (j=0; j<nLPivs; j++) {
aLPivLows[nLPivs-j] = aLPivLows[nLPivs-(j+1)];
aLPivIdxs[nLPivs-j] = aLPivIdxs[nLPivs-(j+1)];
}
aLPivLows[0] = candPrc;
aLPivIdxs[0] = candIdx;
nLPivs++;
}
}
PlotShapes(IIf(aHPivs==1, shapeSmallDownTriangle, shapeNone), colorCustom12, 0, High, Offset=-5);
PlotShapes(IIf(aLPivs==1, shapeSmallUpTriangle , shapeNone), colorCustom11, 0, Low, Offset=-5);
Sell = aHPivs == 1 ;
Buy = aLPivs == 1 ;
Filter=Buy OR Sell;
Sell=ExRem(Sell,Buy);
Buy=ExRem(Buy,Sell);
messageboard = ParamToggle("Message Board","Show|Hide",0);
showsl = ParamToggle("Stop Loss Line", "Show|Hide", 0);
no=10;
res=HHV(H,no);
sup=LLV(L,no);
avd=IIf(C>Ref(res,-1),1,IIf(C<Ref(sup,-1),-1,0));
avn=ValueWhen(avd!=0,avd,1);
s5d=IIf(avn==1,sup,res);
if (showsl == 0)
exitlong = Cross(s5d, H);
exitshort = Cross(L, s5d);
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 = s5d[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 = s5d[i];
tar1 = entry - (entry * .0056);
tar2 = entry - (entry * .0116);
tar3 = entry - (entry * .0216);
bars = i;
i = 0;
}
}
Offset = 20;
Clr = IIf(sig == "BUY", colorGreen, colorRed);
ssl = IIf(bars == BarCount-1, s5d[BarCount-1], Ref(s5d, -1));
sl = ssl[BarCount-1];
Plot(LineArray(bars-Offset, sl, BarCount, sl,1), "", colorDarkRed, styleLine|styleDots, Null, Null, Offset);
for (i=bars; i <BarCount;i++)
{
}
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", 13, 100 );
GfxSetBkMode( 1 );
GfxSetTextColor( colorWhite );
if ( sig =="BUY")
{
GfxSelectSolidBrush( colorBlue );
}
else
{
GfxSelectSolidBrush( colorRed );
}
pxHeight = Status( "pxchartheight" ) ;
xx = Status( "pxchartwidth");
Left = 1100;
width = 310;
x = 5;
x2 = 290;
y = pxHeight;
GfxSelectPen( colorGreen, 1);
GfxRoundRect( x, y - 200, x2, y , 129, 129 ) ;
GfxTextOut( ( " Chaloke Peak N Trough System* "),32,y-185);
GfxTextOut( (" "),27,y-160);
GfxTextOut( ("Last " + sig + " Signal came " + (BarCount-bars-1) * Interval()/60 + " mins ago"), 18, y-160) ; // The text format location
GfxTextOut( ("" + WriteIf(sig =="BUY",sig + " @ ",sig + " @") + " : " + entry), 18, y-140);
GfxTextOut( ("Trailing SL : " + sl + " (" + WriteVal(IIf(sig == "SELL",entry-sl,sl-entry), 2.2) + ")"), 18, y-120);
GfxTextOut( ("TGT:1 : " + tar1), 18, y -100);
GfxTextOut( ("TGT:2 : " + tar2), 18,y-80);
GfxTextOut( ("TGT:3 : " + tar3), 18,y-60);
GfxTextOut( ("Current P/L : " + WriteVal(IIf(sig == "BUY",(C-entry),(entry-C)),2.2)), 88, y-42);;
}
_SECTION_BEGIN("Magnified Market Price");
FS=Param("Font Size",30,30,100,1);
GfxSelectFont("Arial", FS, 900, italic = False, underline = False, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor( ParamColor("Color",colorYellow) );
Hor=Param("Horizontal Position",400,400,400,400);
Ver=Param("Vertical Position",27,27,27,27);
GfxTextOut(""+C,Hor , Ver );
YC=TimeFrameGetPrice("C",inDaily,-1);
DD=Prec(C-YC,2);
xx=Prec((DD/YC)*100,2);
GfxSelectFont("Arial", 12, 700, italic = False, underline = False, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor(ParamColor("Color",colorYellow) );
GfxTextOut(""+DD+" ("+xx+"%)", Hor+5, Ver+45 );
_SECTION_END();
_SECTION_BEGIN("trending ribbon");
uptrend=PDI()>MDI()AND Signal()<MACD();
downtrend=MDI()>PDI()AND Signal()>MACD();
Plot( 2,"ribbon",
IIf( uptrend, colorGreen, IIf( downtrend, colorRed, colorPink )),
styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
_SECTION_END();
GraphXSpace=15;
Ecb faiz kararı 14:45 te açıklanacak.
[quote=kokohan23;403935]Ecb faiz kararı 14:45 te açıklanacak.[/quote]
Ondan sonra 15:30 da draghi konuşacak ve amerikadan önemli veriler gelecek.
Hocam sizin dalga sayımınıza göre yanlış hatırlamıyorsam 70325 kırılması gerkiyordu değil mi ? 64000 li seviyelerin görülmesi için.76875 tepeye göre.
Korelasyonumuzun olduğu mumbai endex -%1 düşüşte.
[quote=kokohan23;403938]Hocam sizin dalga sayımınıza göre yanlış hatırlamıyorsam 70325 kırılması gerkiyordu değil mi ? 64000 li seviyelerin görülmesi için.76875 tepeye göre.[/quote]
kokohan çok iyi hatırlattın,benim de dün aklıma geldi demeyi unuttum sonra..
70.325 bir önceki 4.dalga dibi idi ve bu destek dün ihlal edildi,bu demektir ki son sayımım şu anda doğru olarak yürümektedir..;)
bu bölge aşağı kırılırsa daha rahat olacak,bu sayıma göre 65.000 civarında bir lokal dip gelmeli önümüzdeki günlerde...bu dipten ciddi bir tepki gelebilir,ki bu tepki de 71.000 i zorlayabilir...ilk aşamada 65.000 civarını bekliyorum yani..?ancak sistemler önemli...;)
Ekonomi konusunda bile milliyetçilik yapıyoruz.s&p un kararı eleştiriliyor.aynı kriterlere göre notumuz artarken iyiydi.o zaman methiyeler düzülen s&p şimdi eleştiriliyor.adamlar tüm ülkelerde aynı şekilde incelendiğini söylüyorlar.bunlar hala işsizlik sigortası fonunu niye rezervlere eklemedin diyor.
[quote=kokohan23;403942]Ekonomi konusunda bile milliyetçilik yapıyoruz.s&p un kararı eleştiriliyor.aynı kriterlere göre notumuz artarken iyiydi.o zaman methiyeler düzülen s&p şimdi eleştiriliyor.adamlar tüm ülkelerde aynı şekilde incelendiğini söylüyorlar.bunlar hala işsizlik sigortası fonunu niye rezervlere eklemedin diyor.[/quote]
Bu konu ile ilgili bir arkadaşın yazdığı ve benimde çok beğendiğim yorumu aynen yazıyorum ;
"[B]Kazanın doğurduğuna inanıyorsun da, öldüğüne neden inanmıyorsun?[/B]
Notun pozitife çıkarıldığına inanıyorsun da, durağana çekildiğine neden inanmıyorsun?"
Kokohan23 hata veriyor formül
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=engin sözmen;403944]kokohan23 hata veriyor formül[/quote]
tekrara ekleyeyim bakayım
71850den actigim longlarimi 72900den verip shortta sabirla bekliyorum. 70925 uzerinde 2 bar kalirsa kapanirim sistem geregi. 71275de zorlu bir yer yukari giderse.
SetChartBkColor(64);
PctVlt=(ATR(14)/C)*100;
PK=IIf(PctVlt<0.5,Peak(Close,0.5,1),
IIf( PctVlt>=0.5 AND PctVlt< 1.0 ,Peak(Close,0.70,1),
IIf( PctVlt>=1.0 AND PctVlt< 1.5 ,Peak(Close,0.90,1),
IIf( PctVlt>=1.5 AND PctVlt< 2.0 ,Peak(Close,1.10,1),
IIf( PctVlt>=2.0 AND PctVlt< 2.5 ,Peak(Close,1.30,1),
IIf( PctVlt>=2.5 AND PctVlt< 3.0 ,Peak(Close,1.50,1),
IIf( PctVlt>=3.0 AND PctVlt< 3.5 ,Peak(Close,1.70,1),
IIf( PctVlt>=3.5 AND PctVlt< 4.0 ,Peak(Close,2.00,1),
Peak(Close,2.20,1) ))))))));
TGH=IIf(PctVlt<0.5,Trough(Close,0.5,1),
IIf( PctVlt>=0.5 AND PctVlt< 1.0 ,Trough(Close,0.75,1),
IIf( PctVlt>=1.0 AND PctVlt< 1.5 ,Trough(Close,1.00,1),
IIf( PctVlt>=1.5 AND PctVlt< 2.0 ,Trough(Close,1.25,1),
IIf( PctVlt>=2.0 AND PctVlt< 2.5 ,Trough(Close,1.50,1),
IIf( PctVlt>=2.5 AND PctVlt< 3.0 ,Trough(Close,1.75,1),
IIf( PctVlt>=3.0 AND PctVlt< 3.5 ,Trough(Close,2.00,1),
IIf( PctVlt>=3.5 AND PctVlt< 4.0 ,Trough(Close,2.25,1),
Trough(Close,2.50,1) ))))))));
Sens=IIf(PctVlt<0.5,0.5,
IIf( PctVlt>=0.5 AND PctVlt< 1.0 ,0.75,
IIf( PctVlt>=1.0 AND PctVlt< 1.5 ,1.00,
IIf( PctVlt>=1.5 AND PctVlt< 2.0 ,1.25,
IIf( PctVlt>=2.0 AND PctVlt< 2.5 ,1.50,
IIf( PctVlt>=2.5 AND PctVlt< 3.0 ,1.75,
IIf( PctVlt>=3.0 AND PctVlt< 3.5 ,2.00,
IIf( PctVlt>=3.5 AND PctVlt< 4.0 ,2.25,
2.50 ))))))));
Color=IIf(BarsSince(Cross(C,Ref(PK,-1)))<BarsSince(Cross(Ref(TGH,-1),C)),colorBrightGreen,colorRed);
Plot(C,"Chaloke.com Peak-Trough",Color,styleCandle);
DayH = TimeFrameGetPrice("H", inDaily, -1); DayHI = LastValue (DayH,1);
DayL = TimeFrameGetPrice("L", inDaily, -1); DayLI = LastValue (DayL,1);
DayC = TimeFrameGetPrice("C", inDaily, -1);
DayO = TimeFrameGetPrice("O", inDaily);
DayH2= TimeFrameGetPrice("H", inDaily, -2); DayH2I = LastValue (DayH2,1);
DayL2= TimeFrameGetPrice("L", inDaily, -2); DayL2I = LastValue (DayL2,1);
DayH3= TimeFrameGetPrice("H", inDaily, -3); DayH3I = LastValue (DayH3,1);
DayL3= TimeFrameGetPrice("L", inDaily, -3); DayL3I = LastValue (DayL3,1);
numbars = LastValue(Cum(Status("barvisible")));
hts = -33.5;
YHL = ParamToggle("Yesterday HI LO","Show|Hide",1);
if(YHL==1) {
Plot(DayL,"YL",colorTurquoise,styleNoLine|styleNoLine|styleNoRescale|styleNoTitle);
Plot(DayH,"YH",colorTurquoise,styleNoLine|styleNoLine|styleNoRescale|styleNoTitle);
PlotText(" YH " , LastValue(BarIndex())-(numbars/Hts), DayHI, colorTurquoise);
PlotText(" YL " , LastValue(BarIndex())-(numbars/Hts), DayLI, colorTurquoise);
}
TDBHL = ParamToggle("2/3Days before HI LO","Show|Hide",0);
if(TDBHL==1) {
}
PP = (DayL + DayH + DayC)/3; PPI = LastValue (PP,1);
R1 = (PP * 2) - DayL; R1I = LastValue (R1,1);
S1 = (PP * 2) - DayH; S1I = LastValue (S1,1);
R2 = PP + R1 - S1; R2I = LastValue (R2,1);
S2 = PP - R1 + S1; S2I = LastValue (S2,1);
R3 = PP + R2 - S1; R3I = LastValue (R3,1);
S3 = PP - R2 + S1; S3I = LastValue (S3,1);
ppl = ParamToggle("Pivot Levels","Show|Hide",1);
if(ppl==1) {
Plot(PP, "PP",colorYellow,styleNoLine|styleNoLine|styleNoRescale|styleNoTitle);
PlotText(" Pivot ", LastValue(BarIndex())-(numbars/Hts), PPI, colorYellow);
}
rg = (DayH - DayL);
H5=DayC+1.1*rg; H5I = LastValue (H5,1);
H4=DayC+1.1*rg/2; H4I = LastValue (H4,1);
H3=DayC+1.1*rg/4; H3I = LastValue (H3,1);
H2=DayC+1.1*rg/6; H2I = LastValue (H2,1);
H1=DayC+1.1*rg/12; H1I = LastValue (H1,1);
L1=DayC-1.1*rg/12; L1I = LastValue (L1,1);
L2=DayC-1.1*rg/6; L2I = LastValue (L2,1);
L3=DayC-1.1*rg/4; L3I = LastValue (L3,1);
L4=DayC-1.1*rg/2; L4I = LastValue (L4,1);
L5=DayC-1.1*rg; L5I = LastValue (L5,1);
pcl = ParamToggle("Camerilla Levels","Show|Hide",0);
if(pcl==1) {
Plot(H5,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
Plot(H4,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
Plot(H3,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
Plot(H2,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
Plot(H1,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
Plot(L1,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
Plot(L2,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
Plot(L3,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
Plot(L4,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
Plot(L5,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
PlotText(" H5 = " , LastValue(BarIndex())-(numbars/Hts), H5I +0.05, colorRose);
PlotText(" H4 = " , LastValue(BarIndex())-(numbars/Hts), H4I +0.05, colorRose);
PlotText(" H3 = " , LastValue(BarIndex())-(numbars/Hts), H3I +0.05, colorRose);
PlotText(" H2 = " , LastValue(BarIndex())-(numbars/Hts), H2I +0.05, colorRose);
PlotText(" H1 = " , LastValue(BarIndex())-(numbars/Hts), H1I +0.05, colorRose);
PlotText(" L1 = " , LastValue(BarIndex())-(numbars/Hts), L1I +0.05, colorRose);
PlotText(" L2 = " , LastValue(BarIndex())-(numbars/Hts), L2I +0.05, colorRose);
PlotText(" L3 = " , LastValue(BarIndex())-(numbars/Hts), L3I +0.05, colorRose);
PlotText(" L4 = " , LastValue(BarIndex())-(numbars/Hts), L4I +0.05, colorRose);
PlotText(" L5 = " , LastValue(BarIndex())-(numbars/Hts), L5I +0.05, colorRose);
}
THL = ParamToggle("Todays Hi Lo","Show|Hide",1);
if(THL==1) {
isRth = TimeNum() >= 084500 & TimeNum() <= 085959;
isdRth = TimeNum() >= 084500 & TimeNum() <= 160000;
aRthL = IIf(isRth, L, 1000000);
aRthH = IIf(isdRth, H, Null);
aRthLd = IIf(isdRth, L, 1000000);
DayH = TimeFrameCompress( aRthH, inDaily, compressHigh );
DayH = TimeFrameExpand( DayH, inDaily, expandFirst );
DayL = TimeFrameCompress( aRthLd, inDaily, compressLow );
DayL = TimeFrameExpand( DayL, inDaily, expandFirst );
Bars = BarsSince(TimeNum() >= 94500 AND TimeNum() < 095959);
x0 = BarCount-LastValue(Bars);
x1 = BarCount-1;
DayHline=LineArray(x0,LastValue(DayH),x1,LastValue (DayH),0);
DayLline=LineArray(x0,LastValue(DayL),x1,LastValue (DayL),0);
DayHlineI = LastValue (DayHline,1);
DayLlineI = LastValue (DayLline,1);
Plot(DayHline,"DayHigh",colorYellow,styleNoLine|styleNoRescale|styleNoTitle);
Plot(DayLline,"DayLow",colorYellow,styleNoLine|styleNoRescale|styleNoTitle);
PlotText(" Day High " , LastValue(BarIndex())-(numbars/Hts), DayHlineI +0.05, colorYellow);
PlotText(" Day Low " , LastValue(BarIndex())-(numbars/Hts), DayLlineI +0.05, colorYellow);
}
RSIperiod = 5;
Percent = 5;
EMAperiod = 5;
HHVperiod = 5;
NumLine = 1;
Base = DEMA(RSI(RSIperiod),EMAperiod);
for( i = 1; i <= numline; i++ )
{
ResBase = LastValue(Peak(Base,Percent,i));
SupBase = LastValue(Trough(Base,Percent,i));
Plot(ValueWhen( ResBase==Base, HHV(H,HHVperiod) ), "Resist Level", colorPink,
styleDots);
Plot(ValueWhen( supbase==Base, LLV(L,HHVperiod) ), "Support Level", colorBlue,
styleDots);
}
Title = Name() + "; " + Date() + ": Support & Resistance Levels using RSI: " +
"Num lines
="+WriteVal(numline,1) ;
P6=Param("Trailing Stop Risk",2.5,2,3.5,0.1);
P7=Param("Trailing Stop LookBack",14,5,25,1);
P8=Param("Trailing Stop PrevLow Switch",0,0,1,1);
PrevLow=IIf(P8==1, Ref(C,-TroughBars(C,5,1)) ,Null);
Plot(PrevLow,"",colorRed);
MyTotalPort = Param("MyTotalPort",1000000,10000,10000000,100000) ;
AcceptableRisk = Param("AcceptableRisk",0.5,0.1,3,0.1);
BarsFromStart = BarsSince(Cross(C,Ref(PK,-1))AND Ref(Color,-1)==colorRed) ;
InitialStopLoss =Ref( H - P6*ATR(P7),-BarsFromStart);
PositionSizing = 0.01*AcceptableRisk*MyTotalPort/( C - InitialStopLoss );
Plot(IIf( HHV(H - P6*ATR(P7),BarsFromStart+1) <C ,HHV(H - P6*ATR(P7),BarsFromStart+1),Null) ,"",colorCustom12,1);
PlotShapes(shapeDownArrow*Cross(Ref(HHV(H - P6*ATR(P7),BarsFromStart+1),-1),C),colorBlack,0,H,Offset=-43);
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title =EncodeColor(colorBrightGreen)+ StrFormat("{{NAME}} - {{INTERVAL}} - {{DATE}} - "+ EncodeColor(colorYellow)+"Open = "+ EncodeColor(colorYellow) +"%g "+ EncodeColor(colorBrightGreen)+"High = "+ EncodeColor(colorBrightGreen) +"%g - "+ EncodeColor(colorRed)+"Low = "+ EncodeColor(colorRed) +"%g "+ EncodeColor(colorYellow) +"Close = "+ EncodeColor(colorYellow) +" %g &nbs p; ; (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
" - " + Date() +" - ";
Odd=13;
CoefOdd=round(Odd/2);
Even=12;
Coefeven=Even/2;
Coefeven2=Coefeven+1;
CongestionPercent=2.8;
TriangularOdd=MA(MA(C,CoefOdd),CoefOdd);
TriangularEven=MA(MA(C,Coefeven),Coefeven2);
finalMov_avg=IIf(Odd > even,triangularOdd,TriangularEven);
Color=colorBrightGreen;
tickercolor=colorBlack;
Plot(finalMov_avg,"",IIf(C < finalmov_avg,colorRed,Color),styleDots|styleThick) ;
farback=Param("How Far back to go",200,12,30,1);
nBars = Param("Number of bars", 25, 1, 30, 1);
aHPivs = H - H;
aLPivs = L - L;
aHPivHighs = H - H;
aLPivLows = L - L;
aHPivIdxs = H - H;
aLPivIdxs = L - L;
nHPivs = 0;
nLPivs = 0;
lastHPIdx = 0;
lastLPIdx = 0;
lastHPH = 0;
lastLPL = 0;
curPivBarIdx = 0;
aHHVBars = HHVBars(H, nBars);
aLLVBars = LLVBars(L, nBars);
aHHV = HHV(H, nBars);
aLLV = LLV(L, nBars);
aVisBars = Status("barvisible");
nLastVisBar = LastValue(Highest(IIf(aVisBars, BarIndex(), 0)));
_TRACE("Last visible bar: " + nLastVisBar);
curBar = (BarCount-1);
curTrend = "";
if (aLLVBars[curBar] <
aHHVBars[curBar]) {
curTrend = "D";
}
else {
curTrend = "U";
}
for (i=0; i<farback; i++) {
curBar = (BarCount - 1) - i;
if (aLLVBars[curBar] < aHHVBars[curBar]) {
if (curTrend == "U") {
curTrend = "D";
curPivBarIdx = curBar - aLLVBars[curBar];
aLPivs[curPivBarIdx] = 1;
aLPivLows[nLPivs] = L[curPivBarIdx];
aLPivIdxs[nLPivs] = curPivBarIdx;
nLPivs++;
}
} else {
if (curTrend == "D") {
curTrend = "U";
curPivBarIdx = curBar - aHHVBars[curBar];
aHPivs[curPivBarIdx] = 1;
aHPivHighs[nHPivs] = H[curPivBarIdx];
aHPivIdxs[nHPivs] = curPivBarIdx;
nHPivs++;
}
}
}
curBar = (BarCount-1);
candIdx = 0;
candPrc = 0;
lastLPIdx = aLPivIdxs[0];
lastLPL = aLPivLows[0];
lastHPIdx = aHPivIdxs[0];
lastHPH = aHPivHighs[0];
if (lastLPIdx > lastHPIdx) {
candIdx = curBar - aHHVBars[curBar];
candPrc = aHHV[curBar];
if (
lastHPH < candPrc AND
candIdx > lastLPIdx AND
candIdx < curBar) {
aHPivs[candIdx] = 1;
for (j=0; j<nHPivs; j++) {
aHPivHighs[nHPivs-j] = aHPivHighs[nHPivs-
(j+1)];
aHPivIdxs[nHPivs-j] = aHPivIdxs[nHPivs-(j+1)];
}
aHPivHighs[0] = candPrc ;
aHPivIdxs[0] = candIdx;
nHPivs++;
}
} else {
candIdx = curBar - aLLVBars[curBar];
candPrc = aLLV[curBar];
if (
lastLPL > candPrc AND
candIdx > lastHPIdx AND
candIdx < curBar) {
aLPivs[candIdx] = 1;
for (j=0; j<nLPivs; j++) {
aLPivLows[nLPivs-j] = aLPivLows[nLPivs-(j+1)];
aLPivIdxs[nLPivs-j] = aLPivIdxs[nLPivs-(j+1)];
}
aLPivLows[0] = candPrc;
aLPivIdxs[0] = candIdx;
nLPivs++;
}
}
PlotShapes(IIf(aHPivs==1, shapeSmallDownTriangle, shapeNone), colorCustom12, 0, High, Offset=-5);
PlotShapes(IIf(aLPivs==1, shapeSmallUpTriangle , shapeNone), colorCustom11, 0, Low, Offset=-5);
Sell = aHPivs == 1 ;
Buy = aLPivs == 1 ;
Filter=Buy OR Sell;
Sell=ExRem(Sell,Buy);
Buy=ExRem(Buy,Sell);
messageboard = ParamToggle("Message Board","Show|Hide",0);
showsl = ParamToggle("Stop Loss Line", "Show|Hide", 0);
no=10;
res=HHV(H,no);
sup=LLV(L,no);
avd=IIf(C>Ref(res,-1),1,IIf(C<Ref(sup,-1),-1,0));
avn=ValueWhen(avd!=0,avd,1);
s5d=IIf(avn==1,sup,res);
if (showsl == 0)
exitlong = Cross(s5d, H);
exitshort = Cross(L, s5d);
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 = s5d[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 = s5d[i];
tar1 = entry - (entry * .0056);
tar2 = entry - (entry * .0116);
tar3 = entry - (entry * .0216);
bars = i;
i = 0;
}
}
Offset = 20;
Clr = IIf(sig == "BUY", colorGreen, colorRed);
ssl = IIf(bars == BarCount-1, s5d[BarCount-1], Ref(s5d, -1));
sl = ssl[BarCount-1];
Plot(LineArray(bars-Offset, sl, BarCount, sl,1), "", colorDarkRed, styleLine|styleDots, Null, Null, Offset);
for (i=bars; i <BarCount;i++)
{
}
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", 13, 100 );
GfxSetBkMode( 1 );
GfxSetTextColor( colorWhite );
if ( sig =="BUY")
{
GfxSelectSolidBrush( colorBlue );
}
else
{
GfxSelectSolidBrush( colorRed );
}
pxHeight = Status( "pxchartheight" ) ;
xx = Status( "pxchartwidth");
Left = 1100;
width = 310;
x = 5;
x2 = 290;
y = pxHeight;
GfxSelectPen( colorGreen, 1);
GfxRoundRect( x, y - 200, x2, y , 129, 129 ) ;
GfxTextOut( ( " Chaloke Peak N Trough System* "),32,y-185);
GfxTextOut( (" "),27,y-160);
GfxTextOut( ("Last " + sig + " Signal came " + (BarCount-bars-1) * Interval()/60 + " mins ago"), 18, y-160) ; // The text format location
GfxTextOut( ("" + WriteIf(sig =="BUY",sig + " @ ",sig + " @") + " : " + entry), 18, y-140);
GfxTextOut( ("Trailing SL : " + sl + " (" + WriteVal(IIf(sig == "SELL",entry-sl,sl-entry), 2.2) + ")"), 18, y-120);
GfxTextOut( ("TGT:1 : " + tar1), 18, y -100);
GfxTextOut( ("TGT:2 : " + tar2), 18,y-80);
GfxTextOut( ("TGT:3 : " + tar3), 18,y-60);
GfxTextOut( ("Current P/L : " + WriteVal(IIf(sig == "BUY",(C-entry),(entry-C)),2.2)), 88, y-42);;
}
_SECTION_BEGIN("Magnified Market Price");
FS=Param("Font Size",30,30,100,1);
GfxSelectFont("Arial", FS, 900, italic = False, underline = False, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor( ParamColor("Color",colorYellow) );
Hor=Param("Horizontal Position",400,400,400,400);
Ver=Param("Vertical Position",27,27,27,27);
GfxTextOut(""+C,Hor , Ver );
YC=TimeFrameGetPrice("C",inDaily,-1);
DD=Prec(C-YC,2);
xx=Prec((DD/YC)*100,2);
GfxSelectFont("Arial", 12, 700, italic = False, underline = False, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor(ParamColor("Color",colorYellow) );
GfxTextOut(""+DD+" ("+xx+"%)", Hor+5, Ver+45 );
_SECTION_END();
_SECTION_BEGIN("trending ribbon");
uptrend=PDI()>MDI()AND Signal()<MACD();
downtrend=MDI()>PDI()AND Signal()>MACD();
Plot( 2,"ribbon",
IIf( uptrend, colorGreen, IIf( downtrend, colorRed, colorPink )),
styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
_SECTION_END();
GraphXSpace=15;
SetChartBkColor[SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]64[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
PctVlt=([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ATR[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]14[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])/[B]C[/B])*[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]100[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
PK=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](PctVlt<[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Peak[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]Close[/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]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]),
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( PctVlt>=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] [B]AND[/B] PctVlt< [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ,[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Peak[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]Close[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.70[/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]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( PctVlt>=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] [B]AND[/B] PctVlt< [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ,[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Peak[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]Close[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.90[/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]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( PctVlt>=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] [B]AND[/B] PctVlt< [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2.0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ,[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Peak[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]Close[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.10[/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]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( PctVlt>=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2.0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] [B]AND[/B] PctVlt< [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ,[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Peak[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]Close[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.30[/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]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( PctVlt>=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] [B]AND[/B] PctVlt< [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3.0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ,[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Peak[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]Close[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.50[/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]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( PctVlt>=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3.0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] [B]AND[/B] PctVlt< [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ,[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Peak[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]Close[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.70[/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]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( PctVlt>=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] [B]AND[/B] PctVlt< [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]4.0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ,[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Peak[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]Close[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2.00[/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]Peak[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]Close[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2.20[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]) ))))))));
TGH=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](PctVlt<[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Trough[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]Close[/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]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]),
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( PctVlt>=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] [B]AND[/B] PctVlt< [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ,[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Trough[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]Close[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.75[/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]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( PctVlt>=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] [B]AND[/B] PctVlt< [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ,[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Trough[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]Close[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.00[/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]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( PctVlt>=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] [B]AND[/B] PctVlt< [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2.0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ,[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Trough[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]Close[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.25[/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]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( PctVlt>=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2.0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] [B]AND[/B] PctVlt< [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ,[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Trough[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]Close[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.50[/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]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( PctVlt>=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] [B]AND[/B] PctVlt< [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3.0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ,[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Trough[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]Close[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.75[/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]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( PctVlt>=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3.0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] [B]AND[/B] PctVlt< [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ,[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Trough[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]Close[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2.00[/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]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( PctVlt>=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] [B]AND[/B] PctVlt< [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]4.0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ,[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Trough[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]Close[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2.25[/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]Trough[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]Close[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2.50[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]) ))))))));
Sens=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](PctVlt<[/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]0.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( PctVlt>=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] [B]AND[/B] PctVlt< [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.75[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( PctVlt>=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] [B]AND[/B] PctVlt< [/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]1.00[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( PctVlt>=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] [B]AND[/B] PctVlt< [/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]1.25[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( PctVlt>=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2.0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] [B]AND[/B] PctVlt< [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.50[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( PctVlt>=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] [B]AND[/B] PctVlt< [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3.0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.75[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( PctVlt>=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3.0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] [B]AND[/B] PctVlt< [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2.00[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( PctVlt>=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] [B]AND[/B] PctVlt< [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]4.0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2.25[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],
[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2.50[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ))))))));
Color=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]BarsSince[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Cross[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]C[/B],[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Ref[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](PK,-[/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]BarsSince[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/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]Ref[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](TGH,-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]),[B]C[/B])),[B]colorBrightGreen[/B],[B]colorRed[/B]);
[/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]"Chaloke.com Peak-Trough"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],Color,[B]styleCandle[/B]);
DayH = [/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]); DayHI = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (DayH,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
DayL = [/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]); DayLI = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (DayL,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
DayC = [/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]);
DayO = [/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]);
DayH2= [/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]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]); DayH2I = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (DayH2,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
DayL2= [/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]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]); DayL2I = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (DayL2,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
DayH3= [/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]3[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]); DayH3I = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (DayH3,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
DayL3= [/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]3[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]); DayL3I = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (DayL3,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
numbars = [/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]Cum[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/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]"barvisible"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])));
hts = -[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]33.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
YHL = [/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]"Yesterday HI LO"[/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][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](YHL==[/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](DayL,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"YL"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[B]colorTurquoise[/B],[B]styleNoLine[/B]|[B]styleNoLine[/B]|[B]styleNoRescale[/B]|[B]styleNoTitle[/B]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Plot[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](DayH,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"YH"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[B]colorTurquoise[/B],[B]styleNoLine[/B]|[B]styleNoLine[/B]|[B]styleNoRescale[/B]|[B]styleNoTitle[/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]" YH "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] , [/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]BarIndex[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]())-(numbars/Hts), DayHI, [B]colorTurquoise[/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]" YL "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] , [/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]BarIndex[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]())-(numbars/Hts), DayLI, [B]colorTurquoise[/B]);
}
TDBHL = [/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]"2/3Days before HI LO"[/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]);
[/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](TDBHL==[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]) {
}
PP = (DayL + DayH + DayC)/[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]3[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]; PPI = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (PP,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
R1 = (PP * [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]) - DayL; R1I = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (R1,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
S1 = (PP * [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]) - DayH; S1I = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (S1,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
R2 = PP + R1 - S1; R2I = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (R2,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
S2 = PP - R1 + S1; S2I = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (S2,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
R3 = PP + R2 - S1; R3I = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (R3,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
S3 = PP - R2 + S1; S3I = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (S3,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
ppl = [/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]"Pivot Levels"[/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][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](ppl==[/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](PP, [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"PP"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[B]colorYellow[/B],[B]styleNoLine[/B]|[B]styleNoLine[/B]|[B]styleNoRescale[/B]|[B]styleNoTitle[/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]" Pivot "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/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]BarIndex[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]())-(numbars/Hts), PPI, [B]colorYellow[/B]);
}
rg = (DayH - DayL);
H5=DayC+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]*rg; H5I = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (H5,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
H4=DayC+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]*rg/[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]; H4I = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (H4,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
H3=DayC+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]*rg/[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]4[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]; H3I = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (H3,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
H2=DayC+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]*rg/[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]6[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]; H2I = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (H2,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
H1=DayC+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]*rg/[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]12[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]; H1I = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (H1,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
L1=DayC-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]*rg/[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]12[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]; L1I = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (L1,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
L2=DayC-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]*rg/[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]6[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]; L2I = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (L2,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
L3=DayC-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]*rg/[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]4[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]; L3I = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (L3,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
L4=DayC-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]*rg/[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]; L4I = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (L4,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
L5=DayC-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]*rg; L5I = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (L5,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
pcl = [/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]"Camerilla Levels"[/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]);
[/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](pcl==[/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](H5,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[B]colorRose[/B],[B]styleDots[/B]|[B]styleNoLine[/B]|[B]styleNoRescale[/B]|[B]styleNoTitle[/B]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Plot[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](H4,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[B]colorRose[/B],[B]styleDots[/B]|[B]styleNoLine[/B]|[B]styleNoRescale[/B]|[B]styleNoTitle[/B]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Plot[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](H3,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[B]colorRose[/B],[B]styleDots[/B]|[B]styleNoLine[/B]|[B]styleNoRescale[/B]|[B]styleNoTitle[/B]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Plot[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](H2,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[B]colorRose[/B],[B]styleDots[/B]|[B]styleNoLine[/B]|[B]styleNoRescale[/B]|[B]styleNoTitle[/B]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Plot[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](H1,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[B]colorRose[/B],[B]styleDots[/B]|[B]styleNoLine[/B]|[B]styleNoRescale[/B]|[B]styleNoTitle[/B]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Plot[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](L1,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[B]colorRose[/B],[B]styleDots[/B]|[B]styleNoLine[/B]|[B]styleNoRescale[/B]|[B]styleNoTitle[/B]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Plot[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](L2,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[B]colorRose[/B],[B]styleDots[/B]|[B]styleNoLine[/B]|[B]styleNoRescale[/B]|[B]styleNoTitle[/B]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Plot[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](L3,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[B]colorRose[/B],[B]styleDots[/B]|[B]styleNoLine[/B]|[B]styleNoRescale[/B]|[B]styleNoTitle[/B]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Plot[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](L4,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[B]colorRose[/B],[B]styleDots[/B]|[B]styleNoLine[/B]|[B]styleNoRescale[/B]|[B]styleNoTitle[/B]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Plot[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](L5,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[B]colorRose[/B],[B]styleDots[/B]|[B]styleNoLine[/B]|[B]styleNoRescale[/B]|[B]styleNoTitle[/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]" H5 = "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] , [/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]BarIndex[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]())-(numbars/Hts), H5I +[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.05[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]colorRose[/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]" H4 = "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] , [/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]BarIndex[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]())-(numbars/Hts), H4I +[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.05[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]colorRose[/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]" H3 = "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] , [/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]BarIndex[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]())-(numbars/Hts), H3I +[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.05[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]colorRose[/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]" H2 = "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] , [/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]BarIndex[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]())-(numbars/Hts), H2I +[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.05[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]colorRose[/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]" H1 = "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] , [/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]BarIndex[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]())-(numbars/Hts), H1I +[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.05[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]colorRose[/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]" L1 = "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] , [/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]BarIndex[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]())-(numbars/Hts), L1I +[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.05[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]colorRose[/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]" L2 = "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] , [/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]BarIndex[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]())-(numbars/Hts), L2I +[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.05[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]colorRose[/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]" L3 = "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] , [/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]BarIndex[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]())-(numbars/Hts), L3I +[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.05[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]colorRose[/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]" L4 = "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] , [/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]BarIndex[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]())-(numbars/Hts), L4I +[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.05[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]colorRose[/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]" L5 = "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] , [/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]BarIndex[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]())-(numbars/Hts), L5I +[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.05[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]colorRose[/B]);
}
THL = [/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]"Todays Hi Lo"[/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][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](THL==[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]) {
isRth = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]TimeNum[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]() >= [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]084500[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] & [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]TimeNum[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]() <= [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]085959[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
isdRth = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]TimeNum[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]() >= [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]084500[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] & [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]TimeNum[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]() <= [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]160000[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
aRthL = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](isRth, [B]L[/B], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1000000[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
aRthH = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](isdRth, [B]H[/B], [B]Null[/B]);
aRthLd = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](isdRth, [B]L[/B], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1000000[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
DayH = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]TimeFrameCompress[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( aRthH, [B]inDaily[/B], [B]compressHigh[/B] );
DayH = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]TimeFrameExpand[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( DayH, [B]inDaily[/B], [B]expandFirst[/B] );
DayL = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]TimeFrameCompress[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( aRthLd, [B]inDaily[/B], [B]compressLow[/B] );
DayL = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]TimeFrameExpand[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( DayL, [B]inDaily[/B], [B]expandFirst[/B] );
Bars = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]BarsSince[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]TimeNum[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]() >= [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]94500[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] [B]AND[/B] [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]TimeNum[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]() < [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]095959[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
x0 = [B]BarCount[/B]-[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](Bars);
x1 = [B]BarCount[/B]-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
DayHline=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LineArray[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](x0,[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](DayH),x1,[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (DayH),[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
DayLline=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LineArray[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](x0,[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](DayL),x1,[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (DayL),[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
DayHlineI = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (DayHline,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
DayLlineI = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LastValue[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (DayLline,[/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](DayHline,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"DayHigh"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[B]colorYellow[/B],[B]styleNoLine[/B]|[B]styleNoRescale[/B]|[B]styleNoTitle[/B]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Plot[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](DayLline,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"DayLow"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[B]colorYellow[/B],[B]styleNoLine[/B]|[B]styleNoRescale[/B]|[B]styleNoTitle[/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]" Day High "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] , [/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]BarIndex[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]())-(numbars/Hts), DayHlineI +[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.05[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]colorYellow[/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]" Day Low "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] , [/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]BarIndex[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]())-(numbars/Hts), DayLlineI +[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.05[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]colorYellow[/B]);
}
RSIperiod = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
Percent = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
EMAperiod = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
HHVperiod = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
NumLine = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
Base = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]DEMA[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]RSI[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](RSIperiod),EMAperiod);
[/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 <= numline; i++ )
{
ResBase = [/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]Peak[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](Base,Percent,i));
SupBase = [/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]Trough[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](Base,Percent,i));
[/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]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( ResBase==Base, [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]HHV[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]H[/B],HHVperiod) ), [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Resist Level"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]colorPink[/B],
[B]styleDots[/B]);
[/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]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( supbase==Base, [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LLV[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]L[/B],HHVperiod) ), [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Support Level"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]colorBlue[/B],
[B]styleDots[/B]);
}
[B]Title[/B] = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Name[/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]Date[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]() + [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]": Support & Resistance Levels using RSI: "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] +
[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Num lines
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"+WriteVal(numline,1) ;
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]P6=[/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]"Trailing Stop Risk"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2.5[/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]3.5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
P7=[/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]"Trailing Stop LookBack"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]14[/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]25[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
P8=[/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]"Trailing Stop PrevLow Switch"[/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]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
PrevLow=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](P8==[/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]([B]C[/B],-[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]TroughBars[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]C[/B],[/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]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])) ,[B]Null[/B]);
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Plot[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](PrevLow,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[B]colorRed[/B]);
MyTotalPort = [/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]"MyTotalPort"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1000000[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]10000[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]10000000[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]100000[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]) ;
AcceptableRisk = [/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]"AcceptableRisk"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/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]0.1[/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]0.1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
BarsFromStart = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]BarsSince[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Cross[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]C[/B],[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Ref[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](PK,-[/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](Color,-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])==[B]colorRed[/B]) ;
InitialStopLoss =[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Ref[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [B]H[/B] - P6*[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ATR[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](P7),-BarsFromStart);
PositionSizing = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0.01[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]*AcceptableRisk*MyTotalPort/( [B]C[/B] - InitialStopLoss );
[/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]IIf[/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] - P6*[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ATR[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](P7),BarsFromStart+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]) <[B]C[/B] ,[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]HHV[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]H[/B] - P6*[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ATR[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](P7),BarsFromStart+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]),[B]Null[/B]) ,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[B]colorCustom12[/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]PlotShapes[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]shapeDownArrow[/B]*[/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]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] - P6*[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ATR[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](P7),BarsFromStart+[/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]),[B]C[/B]),[B]colorBlack[/B],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[B]H[/B],Offset=-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]43[/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]_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]([B]colorBrightGreen[/B])+ [/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}} - "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+ [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]EncodeColor[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]colorYellow[/B])+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Open = "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+ [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]EncodeColor[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]colorYellow[/B]) +[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"%g "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+ [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]EncodeColor[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]colorBrightGreen[/B])+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"High = "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+ [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]EncodeColor[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]colorBrightGreen[/B]) +[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"%g - "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+ [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]EncodeColor[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]colorRed[/B])+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Low = "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+ [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]EncodeColor[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]colorRed[/B]) +[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"%g "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+ [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]EncodeColor[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]colorYellow[/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]EncodeColor[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]colorYellow[/B]) +[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" %g &nbs p; ; (%.1f%%) Vol "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] +[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]WriteVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [B]V[/B], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1.0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ) +[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" {{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] + [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Date[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]() +[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" - "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
Odd=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]13[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
CoefOdd=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]round[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](Odd/[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
Even=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]12[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
Coefeven=Even/[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
Coefeven2=Coefeven+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
CongestionPercent=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2.8[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
TriangularOdd=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]MA[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]MA[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]C[/B],CoefOdd),CoefOdd);
TriangularEven=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]MA[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]MA[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]C[/B],Coefeven),Coefeven2);
finalMov_avg=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](Odd > even,triangularOdd,TriangularEven);
Color=[B]colorBrightGreen[/B];
tickercolor=[B]colorBlack[/B];
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Plot[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](finalMov_avg,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]C[/B] < finalmov_avg,[B]colorRed[/B],Color),[B]styleDots[/B]|[B]styleThick[/B]) ;
farback=[/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]"How Far back to go"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]200[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]12[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]30[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
nBars = [/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]"Number of bars"[/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], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]30[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
aHPivs = [B]H[/B] - [B]H[/B];
aLPivs = [B]L[/B] - [B]L[/B];
aHPivHighs = [B]H[/B] - [B]H[/B];
aLPivLows = [B]L[/B] - [B]L[/B];
aHPivIdxs = [B]H[/B] - [B]H[/B];
aLPivIdxs = [B]L[/B] - [B]L[/B];
nHPivs = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
nLPivs = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
lastHPIdx = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
lastLPIdx = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
lastHPH = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
lastLPL = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
curPivBarIdx = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
aHHVBars = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]HHVBars[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]H[/B], nBars);
aLLVBars = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LLVBars[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]L[/B], nBars);
aHHV = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]HHV[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]H[/B], nBars);
aLLV = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LLV[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]L[/B], nBars);
aVisBars = [/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]"barvisible"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
nLastVisBar = [/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]Highest[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](aVisBars, [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]BarIndex[/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=#0000ff][SIZE=1][COLOR=#0000ff]_TRACE[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Last visible bar: "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] + nLastVisBar);
curBar = ([B]BarCount[/B]-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
curTrend = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
[/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (aLLVBars[curBar] <
aHHVBars[curBar]) {
curTrend = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"D"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
}
[/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]else[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] {
curTrend = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"U"[/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]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]; i<farback; i++) {
curBar = ([B]BarCount[/B] - [/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] (aLLVBars[curBar] < aHHVBars[curBar]) {
[/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (curTrend == [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"U"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]) {
curTrend = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"D"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
curPivBarIdx = curBar - aLLVBars[curBar];
aLPivs[curPivBarIdx] = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
aLPivLows[nLPivs] = [B]L[/B][curPivBarIdx];
aLPivIdxs[nLPivs] = curPivBarIdx;
nLPivs++;
}
} [/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]else[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] {
[/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (curTrend == [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"D"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]) {
curTrend = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"U"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
curPivBarIdx = curBar - aHHVBars[curBar];
aHPivs[curPivBarIdx] = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
aHPivHighs[nHPivs] = [B]H[/B][curPivBarIdx];
aHPivIdxs[nHPivs] = curPivBarIdx;
nHPivs++;
}
}
}
curBar = ([B]BarCount[/B]-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
candIdx = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
candPrc = [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
lastLPIdx = aLPivIdxs[[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]];
lastLPL = aLPivLows[[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]];
lastHPIdx = aHPivIdxs[[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]];
lastHPH = aHPivHighs[[/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] (lastLPIdx > lastHPIdx) {
candIdx = curBar - aHHVBars[curBar];
candPrc = aHHV[curBar];
[/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (
lastHPH < candPrc [B]AND
[/B]candIdx > lastLPIdx [B]AND
[/B]candIdx < curBar) {
aHPivs[candIdx] = [/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]for[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (j=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]; j<nHPivs; j++) {
aHPivHighs[nHPivs-j] = aHPivHighs[nHPivs-
(j+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])];
aHPivIdxs[nHPivs-j] = aHPivIdxs[nHPivs-(j+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])];
}
aHPivHighs[[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]] = candPrc ;
aHPivIdxs[[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]] = candIdx;
nHPivs++;
}
} [/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]else[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] {
candIdx = curBar - aLLVBars[curBar];
candPrc = aLLV[curBar];
[/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (
lastLPL > candPrc [B]AND
[/B]candIdx > lastHPIdx [B]AND
[/B]candIdx < curBar) {
aLPivs[candIdx] = [/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]for[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (j=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]; j<nLPivs; j++) {
aLPivLows[nLPivs-j] = aLPivLows[nLPivs-(j+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])];
aLPivIdxs[nLPivs-j] = aLPivIdxs[nLPivs-(j+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])];
}
aLPivLows[[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]] = candPrc;
aLPivIdxs[[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]] = candIdx;
nLPivs++;
}
}
[/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](aHPivs==[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]shapeSmallDownTriangle[/B], [B]shapeNone[/B]), [B]colorCustom12[/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]5[/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](aLPivs==[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [B]shapeSmallUpTriangle[/B] , [B]shapeNone[/B]), [B]colorCustom11[/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]5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
[B]Sell[/B] = aHPivs == [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ;
[B]Buy[/B] = aLPivs == [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] ;
[B]Filter[/B]=[B]Buy[/B] [B]OR[/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]);
[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]);
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]);
showsl = [/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]"Stop Loss Line"[/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]);
no=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]10[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];
res=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]HHV[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]H[/B],no);
sup=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]LLV[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]L[/B],no);
avd=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]C[/B]>[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Ref[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](res,-[/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=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]C[/B]<[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Ref[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](sup,-[/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]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]));
avn=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]ValueWhen[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](avd!=[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],avd,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
s5d=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]IIf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](avn==[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],sup,res);
[/SIZE][B][SIZE=1][COLOR=#800000][SIZE=1][COLOR=#800000]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] (showsl == [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1])
exitlong = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Cross[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1](s5d, [B]H[/B]);
exitshort = [/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Cross[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]L[/B], s5d);
[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 = s5d[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 = s5d[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]colorGreen[/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], s5d[[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](s5d, -[/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, 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]styleDots[/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]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]13[/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][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] );
}
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]290[/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=#0000ff][SIZE=1][COLOR=#0000ff]GfxRoundRect[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( x, y - [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]200[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], x2, y , [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]129[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]129[/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]" Chaloke Peak N Trough System* "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]),[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]32[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],y-[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]185[/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]18[/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]// 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]18[/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=#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]18[/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]"TGT:1 : "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] + tar1), [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]18[/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:2 : "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] + tar2), [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]18[/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:3 : "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1] + tar3), [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]18[/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]"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]42[/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]"Magnified Market Price"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
FS=[/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]"Font Size"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]30[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]30[/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=#800080][SIZE=1][COLOR=#800080]1[/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]"Arial"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], FS, [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]900[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], italic = [B]False[/B], underline = [B]False[/B], [B]True[/B] );
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GfxSetBkMode[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [B]colorWhite[/B] );
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GfxSetTextColor[/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]colorYellow[/B]) );
Hor=[/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]"Horizontal Position"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]400[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]400[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]400[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]400[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
Ver=[/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]"Vertical Position"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]27[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]27[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]27[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1],[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]27[/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]+[B]C[/B],Hor , Ver );
YC=[/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]);
DD=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Prec[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([B]C[/B]-YC,[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]);
xx=[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]Prec[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]((DD/YC)*[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]100[/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=#0000ff][SIZE=1][COLOR=#0000ff]GfxSelectFont[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"Arial"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]12[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]700[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], italic = [B]False[/B], underline = [B]False[/B], [B]True[/B] );
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GfxSetBkMode[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]( [B]colorWhite[/B] );
[/SIZE][SIZE=1][COLOR=#0000ff][SIZE=1][COLOR=#0000ff]GfxSetTextColor[/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]colorYellow[/B]) );
[/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]+DD+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]" ("[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1]+xx+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]"%)"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], Hor+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1], Ver+[/SIZE][SIZE=1][COLOR=#800080][SIZE=1][COLOR=#800080]45[/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]"trending ribbon"[/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]"ribbon"[/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]colorPink[/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]15[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=1];[/SIZE]
[SIZE=1][/SIZE]
[SIZE=1]Düzeltilmiş hali
[/SIZE]
Amibrokerdakini kopyalayıp buraya yapıştırdım.benim formü hatalımıymış?