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ş.
__________________
Burada yazdıklarım kişisel görüşlerimdir.
AL - SAT Tavsiyesi değildir.
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|styleNoL ine|styleNoRescale|styleNoTitle);
Plot(DayH,"YH",colorTurquoise,styleNoLine|styleNoL ine|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|styleNoRe scale|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|styleNo Rescale|styleNoTitle);
Plot(H4,"",colorRose,styleDots|styleNoLine|styleNo Rescale|styleNoTitle);
Plot(H3,"",colorRose,styleDots|styleNoLine|styleNo Rescale|styleNoTitle);
Plot(H2,"",colorRose,styleDots|styleNoLine|styleNo Rescale|styleNoTitle);
Plot(H1,"",colorRose,styleDots|styleNoLine|styleNo Rescale|styleNoTitle);
Plot(L1,"",colorRose,styleDots|styleNoLine|styleNo Rescale|styleNoTitle);
Plot(L2,"",colorRose,styleDots|styleNoLine|styleNo Rescale|styleNoTitle);
Plot(L3,"",colorRose,styleDots|styleNoLine|styleNo Rescale|styleNoTitle);
Plot(L4,"",colorRose,styleDots|styleNoLine|styleNo Rescale|styleNoTitle);
Plot(L5,"",colorRose,styleDots|styleNoLine|styleNo Rescale|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|st yleNoRescale|styleNoTitle);
Plot(DayLline,"DayLow",colorYellow,styleNoLine|sty leNoRescale|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;
__________________
Burada yazdıklarım kişisel görüşlerimdir.
AL - SAT Tavsiyesi değildir.
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;
Düzeltilmiş hali
Amibrokerdakini kopyalayıp buraya yapıştırdım.benim formü hatalımıymış?
__________________
Burada yazdıklarım kişisel görüşlerimdir.
AL - SAT Tavsiyesi değildir.
Ekran ve sinyaller aynı.
__________________
Burada yazdıklarım kişisel görüşlerimdir.
AL - SAT Tavsiyesi değildir.
SİNYAL YERLERİ AYNI AMA GÖRSEL OLARAK FARKLI BAŞKA FORMÜL AŞAĞIDA: _SECTION_END();
_SECTION_BEGIN("Support and Resistance");
xx=BarIndex();x=xx;Lx=LastValue(x);
nbar=Param("N Pivot Bars",3,2,50,1);
npiv=Param("N Pivots lookback period",1,1,50,1);
PivotSymmetry=ParamToggle("Use Symmetric Pivots","Off|On",0);
CleanPivots=ParamToggle("Use Clean Pivots","Off|On",0);
srStyle=ParamToggle("S/R Style","Off|On",1);
if (PivotSymmetry)
{
fc=1;
pk=H>Ref(HHV(H,nbar*fc),-1) AND Ref(HHV(H,nbar),nbar)<=H;
pk=pk AND Lx-ValueWhen(pk,x)>nbar*fc;
tr=L<Ref(LLV(L,nbar*fc),-1) AND Ref(LLV(L,nbar),nbar)>=L;
tr=tr AND Lx-ValueWhen(tr,x)>nbar*fc;
}
else
{
fc=2;
pk=H>Ref(HHV(H,nbar*fc),-1) AND Ref(HHV(H,nbar),nbar)<=H;
pk=pk AND Lx-ValueWhen(pk,x)>nbar*fc;
tr=L<Ref(LLV(L,nbar*fc),-1) AND Ref(LLV(L,nbar),nbar)>=L;
tr=tr AND Lx-ValueWhen(tr,x)>nbar*fc;
}
px0=ValueWhen(pk,x,0); tx0=ValueWhen(tr,x,0);
px1=ValueWhen(pk,x,1); tx1=ValueWhen(tr,x,1);
px2=ValueWhen(pk,x,2); tx2=ValueWhen(tr,x,2);
px3=ValueWhen(pk,x,3); tx3=ValueWhen(tr,x,3);
ph0=ValueWhen(pk,H,0); tl0=ValueWhen(tr,L,0);
ph1=ValueWhen(pk,H,1); tl1=ValueWhen(tr,L,1);
ph2=ValueWhen(pk,H,2); tl2=ValueWhen(tr,L,2);
ph3=ValueWhen(pk,H,3); tl3=ValueWhen(tr,L,3);
if (CleanPivots)
{
pk=IIf(pk AND px0<tx0 AND ph0>ph1,False,pk);
tr=IIf(tr AND px0>tx0 AND tl0<tl1,False,tr);
pk=IIf(pk AND px2>tx1 AND ph1<=ph2,False,pk);
tr=IIf(tr AND tx2>px1 AND tl1>=tl2,False,tr);
px0=ValueWhen(pk,x,0); tx0=ValueWhen(tr,x,0);
px1=ValueWhen(pk,x,1); tx1=ValueWhen(tr,x,1);
px2=ValueWhen(pk,x,2); tx2=ValueWhen(tr,x,2);
px3=ValueWhen(pk,x,3); tx3=ValueWhen(tr,x,3);
ph0=ValueWhen(pk,H,0); tl0=ValueWhen(tr,L,0);
ph1=ValueWhen(pk,H,1); tl1=ValueWhen(tr,L,1);
ph2=ValueWhen(pk,H,2); tl2=ValueWhen(tr,L,2);
ph3=ValueWhen(pk,H,3); tl3=ValueWhen(tr,L,3);
}
GraphXSpace=20;
//SetChartOptions(0,chartShowDates);
//SetBarFillColor(IIf(C>O,ColorRGB(0,175,0),IIf(C<=O ,ColorRGB(175,0,0),colorLightGrey)));
//Plot(C,"\nPrice",IIf(C>O,ColorRGB(0,175,0),IIf(C<= O,ColorRGB(175,0,0),colorLightGrey)),64,0,0,0);
//plotting circles
//PlotShapes(shapeSmallCircle*tr,IIf(Lx-ValueWhen(tr,x)>nbar,ColorRGB(0,100,0),colorWhite) ,0,L,-10);
//PlotShapes(shapeSmallCircle*pk,IIf(Lx-ValueWhen(pk,x)>nbar,ColorRGB(255,0,0),colorWhite) ,0,H,10);
if(srstyle)
{
miny=Status("axisminy");
maxy=Status("axismaxy");
for (i=1;i<=npiv;i++)
{
rr=Ref(ValueWhen(pk,H,i),-nbar);
rr=IIf(rr>maxy OR rr<miny,Null,rr);
ss=Ref(ValueWhen(tr,L,i),-nbar);
ss=IIf(ss>maxy OR ss<miny,Null,ss);
//Plot(rr,"",colorBlue,styleNoLine|styleDots,0,0,0);
//Plot(ss,"",colorRed,styleNoLine|styleDots,0,0,0);
//Buy = Cross(H,rr);
//Sell= Cross(ss,L);
//PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorTurquoise, 0,L, Offset=-25);
//PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorOrange, 0,H, Offset=-25);
}
}
else
{
rr=ValueWhen(pk,H);
rr1=IIf(rr AND BarsSince(pk)>nbar,rr,Null);
rr2=IIf(rr AND BarsSince(pk)<=nbar,rr,Null);
ss=ValueWhen(tr,L);
ss1=IIf(ss AND BarsSince(tr)>nbar,ss,Null);
ss2=IIf(ss AND BarsSince(tr)<=nbar,ss,Null);
//Plot(rr1,"",colorRed,1);
//Plot(rr2,"",colorLightGrey,styleDots|styleNoLine);
//Plot(ss1,"",colorGreen,1);
//Plot(ss2,"",colorLightGrey,styleDots | styleNoLine);
}
/*
Title = EncodeColor(colorGreen)+ "Intraday Trades" + EncodeColor(colorRed) +" Open-"+O+" "+"High-"+H+" "+"Low-"+L+" "+
"Close-"+C+" "+ "Vol= "+ WriteVal(V)+"\n"+EncodeColor(colorTurquoise)+" BUY ABOVE - "+RR+" "+EncodeColor(colorOrange)+
" SELL BELOW - "+SS+" ";
*/
//_SECTION_END();
GfxSetBkMode( 1 );
GfxSetTextColor( colorBrown );
GfxSelectSolidBrush(colorBlack); // this is the box background color
GfxSelectFont( "Tahoma", 20, 100 );
pxHeight = Status( "pxchartheight" ) ;
xx = Status( "pxchartwidth");
Left = 1100;
width = 280;
x = 1235;
x2 = 980;
y = pxHeight;
//GfxSelectPen( colorGreen, 1); // broader color
//GfxRoundRect( x, y - 60, x2, y , 7, 7 ) ;
//GfxTextOut( ( " Trading System "),88,y-165);
GfxTextOut( (" "),27,y-160);
//GfxTextOut( ("BUY ABOVE : "+RR+" "), 13, y-58) ; // The text format location
//GfxTextOut( ("SELL BELOW : "+SS+""), 13, y-30);
//Modified by Sandipan
GfxTextOut( ("Support : "+SS+" "), 990, y-58) ; // The text format location
GfxTextOut( ("Resistance : "+RR+""), 990, y-30);
_SECTION_END();
_SECTION_BEGIN("Trend Lines");
p1 = Param("TL 1 Periods", 20, 5, 50, 1);
p2 = Param("TL 2 Periods", 5, 3, 25, 1);
TL1 = LinearReg(C, p1);
TL2 = EMA(TL1, p2);
Col1 = IIf(TL1 > TL2, ParamColor("TL Up Colour", colorGreen), ParamColor("TL Dn Colour", colorRed));
Plot(TL1, "TriggerLine 1", Col1, styleLine|styleThick|styleNoLabel);
Plot(TL2, "TriggerLine 2", Col1, styleLine|styleThick|styleNoLabel);
_SECTION_END();
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
SetChartBkGradientFill(ParamColor("Top", colorTeal), ParamColor("Bottom", colorLightGrey), ParamColor("Title", colorTeal));
SetChartBkColor(colorTeal);
R2PDS=20; /*for automatic adjustments to the r2 critical value line use one of the periods listed above*/
R2=Correlation(Cum( 1 ),C,r2pds)*Correlation(Cum( 1 ),C,r2pds);
slope=LinRegSlope(C,r2pds);
Crit=IIf(R2PDS==5,.77,IIf(R2PDS==10,.40,IIf(R2PDS= =14,.27,IIf(R2PDS==20,.20,IIf(R2PDS==25,.16,IIf(R2 PDS==30,.13,IIf(R2PDS==50,.08,IIf(R2PDS==60,.06,II f(R2PDS==120,.03,0)))))))));
Ttl=EncodeColor(colorWhite)+ WriteIf(R2>Crit,"\nR2 Values indicate a Trend is in place","R2 Values Indicate a Trendliess Market")+WriteIf(slope>0," - Slope is Positive"," - Slope is Negative");
/*
"\n \n Interpretation \n r-squared values show the percentage of movement that can be explained by linear regression. For example, if the r-squared value over 20 days is at 70%, this means that 70% of the movement of the security is explained by linear regression. The other 30% is unexplained Random noise.\n While R2 values are interesting on their own they are easier to interpret when used in conjunction with Slope. When R2 exceeds its critical Value this indicates the market is Trending, when the indicator falls below its threshold then a trend less condition may be in place. \n This table shows the values of r-squared required for A 95% confidence level at various time periods. If the r-squared value is less than the critical values shown, you should assume that prices show no statistically significant trend. \n \n R-2 Pds Critical Value(95%confidence)"+
"\n \n 5 0.77\n 10 0.40\n 14 0.27\n 20 0.20\n 25 0.16\n 30 0.13\n 50 0.08 \n 60 0.06 \n 120 0.03"
+"\n \n You may even consider opening a Short-term position opposite the prevailing trend when you observe r-squared rounding off at extreme levels. For example, if the slope is positive AND r-squared is above 0.80 then begins to turn down, you may consider selling or opening A Short position. There are numerous ways to use the linear regression outputs of r-squared and Slope in trading systems. For more detailed coverage, refer to the book The New Technical Trader by Tushar Chande and Stanley Kroll";
*/
PO=TimeFrameGetPrice( "O", inDaily, -1 );
PL=TimeFrameGetPrice( "L", inDaily, -1 );
PH=TimeFrameGetPrice( "H", inDaily, -1 );
PC=TimeFrameGetPrice( "C", inDaily, -1 );
TO= TimeFrameGetPrice( "O", inDaily, 0 );
TH= TimeFrameGetPrice( "H", inDaily, 0 );
TL= TimeFrameGetPrice( "L", inDaily, 0 );
TC= TimeFrameGetPrice( "C", inDaily, 0 );
PC1= TimeFrameGetPrice( "C", inDaily, -2 );
P=((PH+PL+PC)/3);
R1=((2*P)-PL);
S1=((2*P)-PH);
R2=((P-S1)+R1);
S2=(P-(R1-S1));
R3=PH+(2*(P-PL));
S3=PL-(2*(PH-P));
R=TH-TL;
PP=(TH+TL+TO+TO)/4;
RR1=PP+(R*0.38);
RR2=PP+(R*0.62);
SS1=PP-(R*0.38);
SS2=PP-(R*0.62);
PPP=(TH+TL+TO+TO)/4;
RRR1=((2*PPP)-TL);
SSS1=((2*PPP)-TH);
RRR2=((PPP-SSS1)+RRR1);
SSS2=(PPP-(RRR1-SSS1));
Pchange=PC-PC1;
PPerChange=(Pchange/PC1)*100;
Tchange=TC-PC;
TPerChange=(Tchange/TC)*100;
Ttle= EncodeColor(colorWhite)+
"\nPrevious - Open :-"+PO+" High :-"+PH+" Low :-"+PL+" Close :-"+PC+" Change:- "+Pchange+" %ge:- "+WriteVal(PPerChange,1.2)+
"\nTodays - Open :-"+TO+" High :-"+TH+" Low :-"+TL+" Close :-"+TC+" Change:- "+Tchange+" %ge:- "+WriteVal(TPerChange,1.2)+
//"\n"+
//"\n"+
"\nLevels"+
"\nEOD Pivot :-"+WriteVal(P,1.2)+
"\nS-1 :-"+WriteVal(S1,1.2)+" - R-1 :-"+WriteVal(R1,1.2)+
"\nS-2 :-"+WriteVal(S2,1.2)+" - R-2 :-"+WriteVal(R2,1.2)+
"\nS-3 :-"+WriteVal(S3,1.2)+" - R-3 :-"+WriteVal(R3,1.2)+
//"\n"+
"\nIntraday Pivot :-"+WriteVal(PP,1.2)+
"\nS-1 :-"+WriteVal(SSS1,1.2)+" - R-1 :-"+WriteVal(RRR1,1.2)+
"\nS-2 :-"+WriteVal(SSS2,1.2)+" - R-2 :-"+WriteVal(RRR2,1.2)+
//"\n"+
"\nIntraday Retracement Levels"+
"\nS-1 :-"+WriteVal(SS1,1.2)+" - R-1:-"+WriteVal(RR1,1.2)+
"\nS-2 :-"+WriteVal(SS2,1.2)+" - R-2:-"+WriteVal(RR2,1.2);
//====================================Start of Linear Regression Code============================================== ====================================
P = ParamField("Price field",-1);
Length = 150;
Daysback = Param("Period for Liner Regression Line",Length,1,240,1);
shift = Param("Look back period",0,0,240,1);
//=============================== Math Formula ================================================== ================================================== ====
x = Cum(1);
lastx = LastValue( x ) - shift;
aa = LastValue( Ref(LinRegIntercept( p, Daysback), -shift) );
bb = LastValue( Ref(LinRegSlope( p, Daysback ), -shift) );
y = Aa + bb * ( x - (Lastx - DaysBack +1 ) );
//==================Plot the Linear Regression Line ================================================== ==================================================
LRColor = ParamColor("LR Color", colorCycle );
LRStyle = ParamStyle("LR Style");
LRLine = IIf( x > (lastx - Daysback) AND BarIndex() < Lastx, y, Null );
LRStyle = ParamStyle("LR Style");
Angle = Param("Angle", 0.05, 0, 1.5, 0.01);// A slope higher than 0.05 radians will turn green, less than -0.05 will turn red and anything in between will be white.
LRLine = IIf( x > (lastx - Daysback) AND BarIndex() < Lastx, y, Null );
Pi = 3.14159265 * atan(1); // Pi
SlopeAngle = atan(bb)*(180/Pi);
LineUp = SlopeAngle > Angle;
LineDn = SlopeAngle < - Angle;
if(LineUp)
{
Plot(LRLine, "Lin. Reg. Line Up", IIf(LineUp, colorBrightGreen, colorWhite), LRStyle);
}
else
{
Plot(LRLine, "Lin. Reg. Line Down", IIf(LineDn, colorDarkRed, colorWhite), LRStyle);
}
//========================== Plot 1st SD Channel ================================================== ================================================== ==
SDP = Param("Standard Deviation", 1.5, 0, 6, 0.1);
SD = SDP/2;
width = LastValue( Ref(SD*StDev(p, Daysback),-shift) ); //Set width of inside chanels here.
SDU = IIf( x > (lastx - Daysback) AND BarIndex() < Lastx, y+width , Null ) ;
SDL = IIf( x > (lastx - Daysback) AND BarIndex() < Lastx, y-width , Null ) ;
SDColor = ParamColor("SD Color", colorCycle );
SDStyle = ParamStyle("SD Style");
//Plot( SDU , "\nUpper Lin Reg", colorWhite,SDStyle ); //Inside Regression Lines
//Plot( SDL , "Lower Lin Reg", colorWhite,SDStyle ); //Inside Regression Lines
//========================== Plot 2d SD Channel ================================================== ================================================== ====
SDP2 = Param("2d Standard Deviation", 2.0, 0, 6, 0.1);
SD2 = SDP2/2;
width2 = LastValue( Ref(SD2*StDev(p, Daysback),-shift) ); //Set width of outside chanels here.
SDU2 = IIf( x > (lastx - Daysback) AND BarIndex() < Lastx, y+width2 , Null ) ;
SDL2 = IIf( x > (lastx - Daysback) AND BarIndex() < Lastx, y-width2 , Null ) ;
SDColor2 = ParamColor("2 SD Color", colorCycle );
SDStyle2 = ParamStyle("2 SD Style");
//Plot( SDU2 , "Upper Lin Reg", colorWhite,SDStyle2 ); //OutSide Regression Lines
//Plot( SDL2 , "Lower Lin Reg", colorWhite,SDStyle2 ); //OutSide Regression Lines
Trend = IIf(LRLine > Ref(LRLine,-1),colorGreen,colorRed);//Changes LR line to green if sloping up and red if sloping down.
Plot( LRLine , "LinReg", Trend, LRSTYLE );
//============================ End Indicator Code ================================================== ================================================== ====
_N(Title = EncodeColor(55)+StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) )+" "+Ttl+Ttle);
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
_SECTION_BEGIN("SAR");
//P = ParamField( "Price field" );
//T3MA toggle
T3MAT=ParamToggle("Moving Average","No|Yes",defaultval=1 );
T3MAP = Param("T3MA Periods", 21, 2, 300, 1, 10 );
function T3(price,periods)
{
s = 0.84;
e1=EMA(price,periods);
e2=EMA(e1,Periods);
e3=EMA(e2,Periods);
e4=EMA(e3,Periods);
e5=EMA(e4,Periods);
e6=EMA(e5,Periods);
c1=-s*s*s;
c2=3*s*s+3*s*s*s;
c3=-6*s*s-3*s-3*s*s*s;
c4=1+3*s+s*s*s+3*s*s;
Ti3=c1*e6+c2*e5+c3*e4+c4*e3;
return ti3;
}
T3MA = T3(P,T3MAP);
//T3MA Display
//T3MAB1=0;
//T3MAS1=0
if(T3MAT==1)
{
T3MABuy = Cross(C,T3MA);
//if(T3MABuy)
//T3MAB1=1;
T3MASell = Cross(T3MA,C);
//if(T3MASell)
//T3MAS1=1;
T3MAcolor = IIf(C>=T3MA,colorBlue,colorYellow);
Plot(T3MA,"\nT3MA",T3MAcolor,styleThick);
PlotShapes(shapeStar*T3MABuy,colorWhite,0,L,-20);
PlotShapes(shapeStar*T3MASell,colorBlack,0,H,20);
//T3MAShape = T3MABuy * shapeHollowStar + T3MASell * shapeHollowStar;
//PlotShapes(T3MAShape, IIf(T3MABuy ,colorGreen,colorRed), 0,IIf(T3MABuy ,Low,High));
}
//mau = TEMA(C,20);
//Plot(Ref(mau, -1),"MA20", colorGreen, styleThick) ;
//mav = TEMA(C,50);
//Plot(Ref(mav, -1),"MA50", colorGold, styleThick) ;
/*for automatic adjustments to the r2 critical value line use one of the periods listed above*/
/*
R2PDS=20;
R2=Correlation(Cum( 1 ),C,r2pds)*Correlation(Cum( 1 ),C,r2pds);
slope=LinRegSlope(C,r2pds);
Crit=IIf(R2PDS==5,.77,IIf(R2PDS==10,.40,IIf(R2PDS= =14,.27,IIf(R2PDS==20,.20,IIf(R2PDS==25,.16,IIf(R2 PDS==30,.13,IIf(R2PDS==50,.08,IIf(R2PDS==60,.06,II f(R2PDS==120,.03,0)))))))));
*/
//Title=WriteIf(R2>Crit,"R2 Values indicate a Trend is in place","R2 Values Indicate a Trendliess Market")+WriteIf(slope>0,"\n Slope is Positive","\n Slope is Negative");
/*
"\n \n Interpretation \n r-squared values show the percentage of movement that can be explained by linear regression. For example, if the r-squared value over 20 days is at 70%, this means that 70% of the movement of the security is explained by linear regression. The other 30% is unexplained Random noise.\n While R2 values are interesting on their own they are easier to interpret when used in conjunction with Slope. When R2 exceeds its critical Value this indicates the market is Trending, when the indicator falls below its threshold then a trend less condition may be in place. \n This table shows the values of r-squared required for A 95% confidence level at various time periods. If the r-squared value is less than the critical values shown, you should assume that prices show no statistically significant trend. \n \n R-2 Pds Critical Value(95%confidence)"+
"\n \n 5 0.77\n 10 0.40\n 14 0.27\n 20 0.20\n 25 0.16\n 30 0.13\n 50 0.08 \n 60 0.06 \n 120 0.03"
+"\n \n You may even consider opening a Short-term position opposite the prevailing trend when you observe r-squared rounding off at extreme levels. For example, if the slope is positive AND r-squared is above 0.80 then begins to turn down, you may consider selling or opening A Short position. There are numerous ways to use the linear regression outputs of r-squared and Slope in trading systems. For more detailed coverage, refer to the book The New Technical Trader by Tushar Chande and Stanley Kroll";
*/
acc = Param("Acceleration", 0.1, 0, 1, 0.001 );
accm = Param("Max. acceleration", 0.06, 0, 1, 0.001 );
SAR1 = SAR(acc,accm);
//Buy1 = Cross(Open, SAR(acc,accm)) AND (T3MAB1==1);
//Sell1 = Cross(SAR(acc,accm), Open ) AND (T3MAS1==1);
Buy1 = Cross(Open, SAR(acc,accm));
Sell1 = Cross(SAR(acc,accm), Open );
if (ParamToggle("SAR","Show|Hide",1)){
Plot(SAR1,"",1,styleDots|styleNoLine);
PlotShapes(IIf(Buy1,shapeUpArrow,shapeNone), colorYellow, 0, Low, Offset=-15);
PlotShapes(IIf(Buy1,shapeSmallCircle,shapeNone), colorYellow, 0, Low, Offset=-28);
PlotShapes(IIf(Sell1, shapeDownArrow,shapeNone), colorWhite, 0, High, Offset=-15);
PlotShapes(IIf(Sell1, shapeSmallCircle,shapeNone), colorWhite, 0, High, Offset= 28);
}
_SECTION_END();
messageboard = ParamToggle("Message Board","Show|Hide",0);
exitlong = Sell1;
PlotShapes(exitlong * shapeDownArrow, colorBlack,0,H,-10);
exitshort = Buy1;
PlotShapes(exitshort * shapeUpArrow, colorBlack,0,L,-15);
Buy = exitshort;
Sell = exitlong;
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
AlertIf( Buy, "", "BUY @ " + C, 1 );
AlertIf( Sell, "", "SELL @ " + C, 2 );
for(i=BarCount-1;i>1;i--)
{
if(Buy[i] == 1)
{
entry = C[i];
sig = "BUY";
sl = sar1[i];
tar1 = entry + (entry * .0056);
tar2 = entry + (entry * .0116);
tar3 = entry + (entry * .0216);
bars = i;
i = 0;
}
if(Sell[i] == 1)
{
sig = "SELL";
entry = C[i];
sl = SAR1[i];
tar1 = entry - (entry * .0056);
tar2 = entry - (entry * .0116);
tar3 = entry - (entry * .0216);
bars = i;
i = 0;
}
}
Offset = 20;
Clr = IIf(sig == "BUY", colorLime, colorRed);
ssl = IIf(bars == BarCount-1, sar1[BarCount-1], Ref(SAR1, -1));
sl = ssl[BarCount-1];
Plot(LineArray(bars-Offset, tar1, BarCount, tar1,1), "", Clr, styleLine|styleDots, Null, Null, Offset);
Plot(LineArray(bars-Offset, tar2, BarCount, tar2,1), "", Clr, styleLine|styleDots, Null, Null, Offset);
Plot(LineArray(bars-Offset, tar3, BarCount, tar3,1), "", Clr, styleLine|styleDots, Null, Null, Offset);
Plot(LineArray(bars-Offset, sl, BarCount, sl,1), "", colorDarkRed, styleLine|styleLine, Null, Null, Offset);
Plot(LineArray(bars-Offset, entry, BarCount, entry,1), "", colorGreen, styleLine|styleLine, Null, Null, Offset);
for (i=bars; i <BarCount;i++)
{
PlotText(""+sig+"@"+entry, BarCount+1,entry,Null,colorBlue);
PlotText("T1@"+tar1,BarCount+3,tar1,Null,Clr);Plot Text("T2@"+tar2,BarCount+3,tar2,Null,Clr);PlotText ("T3@"+tar3,BarCount+3,tar3,Null,Clr);
}
printf("Last " + sig + " Signal came " + (BarCount-bars) + " bars ago");
printf("\n" + sig + " @ : " + entry + "\nStop Loss : " + sl + " (" + WriteVal(IIf(sig == "SELL",entry-sl,sl-entry), 2.2) + ")"+ "\nTarget_1 : " + tar1 + "\nTarget_2 : " + tar2 + "\nTarget_3 : " + tar3);
printf("\nCurrent P/L : " + WriteVal(IIf(sig == "BUY",(C-entry),(entry-C)),2.2));
if (messageboard == 0 )
{
GfxSelectFont( "Tahoma", 9, 100 );
GfxSetBkMode( 1 );
GfxSetTextColor( colorWhite );
if ( sig =="BUY")
{
GfxSelectSolidBrush( colorBlue ); // this is the box background color
}
else
{
GfxSelectSolidBrush( colorRed ); // this is the box background color
}
pxHeight = Status( "pxchartheight" ) ;
xx = Status( "pxchartwidth");
Left = 1100;
width = 310;
x = 5;
x2 = 210;
y = pxHeight;
GfxSelectPen( colorGreen, 1); // broader color
GfxRoundRect( x, y - 163, x2, y , 7, 7 ) ;
GfxTextOut( ( " Message Box "),88,y-165);
GfxTextOut( (" "),27,y-160);
GfxTextOut( ("Last " + sig + " Signal came " + (BarCount-bars-1) * Interval()/60 + " mins ago"), 13, y-140) ; // The text format location
GfxTextOut( ("" + WriteIf(sig =="BUY",sig + " @ ",sig + " @") + " : " + entry), 13, y-120);
GfxTextOut( ("Trailing SL : " + sl + " (" + WriteVal(IIf(sig == "SELL",entry-sl,sl-entry), 2.2) + ")"), 13, y-100);
GfxTextOut( ("TGT:1 : " + tar1), 13, y -80);
GfxTextOut( ("TGT:2 : " + tar2), 13,y-60);
GfxTextOut( ("TGT:3 : " + tar3), 13,y-40);
GfxTextOut( ("Current P/L : " + WriteVal(IIf(sig == "BUY",(C-entry),(entry-C)),2.2)), 88, y-22);;
}
_SECTION_BEGIN("ADX");
uptrend=PDI()>MDI()AND Signal()<MACD();
downtrend=MDI()>PDI()AND Signal()>MACD();
Plot( 2, "ADX",IIf( uptrend, colorGreen, IIf( downtrend, colorRed, colorBlack )), styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
_SECTION_END();
GraphXSpace=5;
__________________
Burada yazdıklarım kişisel görüşlerimdir.
AL - SAT Tavsiyesi değildir.
Eur/usd düştüğü halde dax yükseliyor.piyasada 3.ltro beklentisi var galiba
__________________
Burada yazdıklarım kişisel görüşlerimdir.
AL - SAT Tavsiyesi değildir.
Şu an 1 kullanıcı var. (0 üye ve 1 konuk)
Yer imleri