Fibonacci


_SECTION_BEGIN("CNcP");
Cd1=-(O-C)/(H-L)*100;
Cd=Prec((Cd1),2);
ColorE=IIf(Cd>=68,colorYellow,IIf(Cd<=-68,colorRed,colorCustom12));
_SECTION_END();
_SECTION_BEGIN("Price");
BarColor = IIf((Cd>=68)OR (Cd<=-68),colorWhite,colorCustom12);
Plot(C, "", BarColor, styleNoTitle| styleThick | styleCandle|styleNoLabel);
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );


_SECTION_BEGIN("AA - Fibonacci Retracements and Goals");
///////////////////////////////////////////////////
// **************** Parameters ********************
//
Period = Param("Period", 1, 1, 50);
ShowExt = ParamToggle("Show Extension ?", "No|Yes");
///////////////////////////////////////////////////
// **************** Calculations *****************
//
Period = Period*(13*.618);
Hhb = LastValue(Ref(HHVBars(H, Period), -1))+1;
Llb = LastValue(Ref(LLVBars(L, Period), -1))+1;
Hv = LastValue(Ref(HHV(H, Period), -1));
Lv = LastValue(Ref(LLV(L, Period), -1));
Range = (Hv - Lv);
LText = "0 %, 23.6 %, 38.2 %, 50 %, 61.8 %, 78.6 %, 100 %, 1.618 %, 1.72 %, 200 %";
if(Hhb > Llb)
{
Levels[0] = Lv;
Levels[1]= (Range *.236)+Levels[0];
Levels[2]= (Range *.382)+Levels[0];
Levels[3]= (Range *.5)+Levels[0];
Levels[4]= (Range *.618)+Levels[0];
Levels[5]= (Range *.786)+Levels[0];
Levels[6]= Hv;
Levels[7]= (Range *.618)+Levels[6];
Levels[8]= (Range *.72)+Levels[6];
Levels[9]= (Range )+Levels[6];
x0 = BarCount - 1 - Llb;
x1 = BarCount - 1 - Hhb;
}
else
{
Levels[0]= Hv;
Levels[1]= Levels[0]- (Range *.236);
Levels[2]= Levels[0]- (Range *.382);
Levels[3]= Levels[0]- (Range *.5);
Levels[4]= Levels[0]- (Range *.618);
Levels[5]= Levels[0]- (Range *.786);
Levels[6]= Lv;
Levels[7]= Levels[6]- (Range *.618);
Levels[8]= Levels[6]- (Range *.72);
Levels[9]= Levels[6]- (Range );
x0 = BarCount - 1 - Hhb;
x1 = BarCount - 1 - Llb;
}
//////////////////////////////////////////////////////////////////////////////////////
/// **************************** Plotting Area ********************************
//
for(i=0; i<10; i++)
{
if(i!=6)
x = x0;
else
x = x1;
if(i<7 OR ShowExt)
{
Plot(LineArray(x, Levels[i], BarCount, Levels[i]), "", i+2, styleDots);
PlotText(StrExtract(LText, i), BarCount, Levels[i], i+2);
}
}
_SECTION_BEGIN("Top-Bodem-123's");
SetChartBkGradientFill( ParamColor("Inner panel upper",colorBlack),ParamColor("Inner panel lower",colorBlack));
xx=BarIndex();x=xx;Lx=LastValue(x);
nbar=3; 
CleanPivots=0;
fc=2;
pk=H>Ref(HHV(H,nbar*fc),-1) AND Ref(HHV(H,nbar),nbar)<=H;
tr=L<Ref(LLV(L,nbar*fc),-1) AND Ref(LLV(L,nbar),nbar)>=L;
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)
{
tr=IIf(pk AND tr AND ph1>ph2 AND tl1>tl2,False,tr);
pk=IIf(pk AND tr AND ph1<ph2 AND tl1<tl2,False,pk);
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);
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);
pk=IIf(pk AND px1>tx1 AND ph1<tl1,False,pk);
tr=IIf(tr AND tx1>px1 AND tl1>ph1,False,tr);
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);
pk=IIf(pk AND px0>px1 AND px1>tx1 AND px1>tx0 AND ph0>ph1,False,pk);
tr=IIf(tr AND tx0>tx1 AND tx1>px1 AND tx1>px0 AND tl0<tl1,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);
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);
pk=IIf(pk AND px1>tx1 AND ph1<tl1,False,pk);
tr=IIf(tr AND tx1>px1 AND tl1>ph1,False,tr);
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);
pk=IIf(pk AND px0>px1 AND px1>tx1 AND px1>tx0 AND ph0>ph1,False,pk);
tr=IIf(tr AND tx0>tx1 AND tx1>px1 AND tx1>px0 AND tl0<tl1,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);
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);
pk=IIf(pk AND px1>tx1 AND px2>tx1 AND ph1<ph2,False,pk);
tr=IIf(tr AND tx1>px1 AND tx2>px1 AND tl1>tl2,False,tr); 
}
disp1=ParamToggle("Display 1-2-3 Labels","Show|Hide",1);
disp2=ParamToggle("Display Cycle Lines","Show|Hide",1);
dxhm=14;
dxlm=10;
dxh=2;//
dxl=2;//
dyhm=5;//
dylm=3;//
dyh=5;//
dyl=15;//
hm=30;
lm=30;
function GetVisibleBarCount() 
{
lvb=Status("lastvisiblebar");
fvb=Status("firstvisiblebar");
return Min(lvb-fvb,BarCount-fvb);
} 
function GfxConvertPixelsToBarX(Pixels)
{
lvb=Status("lastvisiblebar");
fvb=Status("firstvisiblebar");
pxchartleft=Status("pxchartleft");
pxchartwidth=Status("pxchartwidth");
fac=pxchartwidth/Pixels;
bar=(lvb-fvb)/fac;
return bar;
} 
function GfxConvertPixelToValueY(Pixels) 
{
local Miny,Maxy,pxchartbottom,pxchartheight;
Miny=Status("axisminy");
Maxy=Status("axismaxy");
pxchartbottom=Status("pxchartbottom");
pxchartheight=Status("pxchartheight");
fac=pxchartheight/Pixels;
Value=(Maxy-Miny)/fac;
return Value;
} 
if(disp1)
{
ll=tr AND tl1<tl2;
hl=tr AND tl1>tl2;
hh=pk AND ph1>ph2;
lh=pk AND ph1<ph2;
dt=pk AND ph1==ph2;
db=tr AND tl1==tl2;
miny=Status("axisminy");
maxy=Status("axismaxy");
AllVisibleBars=GetVisibleBarCount();
fvb=Status("firstvisiblebar");
LowMargin=Miny+GfxConvertPixelToValueY(lm);
HighMargin=Maxy-GfxConvertPixelToValueY(hm);
dyllm=GfxConvertPixelToValueY(dylm);
dyhhm=GfxConvertPixelToValueY(dyhm);
dyll=GfxConvertPixelToValueY(dyl);
dyhh=GfxConvertPixelToValueY(dyh);
dxllm=GfxConvertPixelsToBarX(dxlm);
dxhhm=GfxConvertPixelsToBarX(dxhm);
dxll=GfxConvertPixelsToBarX(dxl);
dxhh=GfxConvertPixelsToBarX(dxh);
for(i=0;i<AllVisibleBars;i++) 
{
if(ll[i+fvb] AND L[i+fvb]>LowMargin) PlotText("1",i+fvb+dxll,L[i+fvb]-dyll,colorYellow,colorRed);
if(ll[i+fvb] AND L[i+fvb]<=LowMargin) PlotText("1",i+fvb+dxll+dxllm,L[i+fvb]-dyllm,colorYellow,colorRed);
if(hl[i+fvb] AND L[i+fvb]>LowMargin) PlotText("1",i+fvb+dxll,L[i+fvb]-dyll,colorYellow,colorRed);
if(hl[i+fvb] AND L[i+fvb]<=LowMargin) PlotText("1",i+fvb+dxll+dxllm,L[i+fvb]-dyllm,colorYellow,colorRed);
if(db[i+fvb] AND L[i+fvb]>LowMargin) PlotText("1",i+fvb+dxll,L[i+fvb]-dyll,colorYellow,colorRed);
if(db[i+fvb] AND L[i+fvb]<=LowMargin) PlotText("1",i+fvb+dxll+dxllm,L[i+fvb]-dyllm,colorYellow,colorRed); 
if(hh[i+fvb] AND H[i+fvb]<HighMargin) PlotText("2",i+fvb+dxhh,H[i+fvb]+dyhh,colorRed,colorYellow);
if(hh[i+fvb] AND H[i+fvb]>=HighMargin) PlotText("2",i+fvb+dxhh+dxhhm,H[i+fvb]+dyhhm,colorRed,colorYellow); 
if(lh[i+fvb] AND H[i+fvb]<HighMargin) PlotText("2",i+fvb+dxhh,H[i+fvb]+dyhh,colorRed,colorYellow);
if(lh[i+fvb] AND H[i+fvb]>=HighMargin) PlotText("2",i+fvb+dxhh+dxhhm,H[i+fvb]+dyhhm,colorRed,colorYellow); 
if(dt[i+fvb] AND H[i+fvb]<HighMargin) PlotText("2",i+fvb+dxhh,H[i+fvb]+dyhh,colorRed,colorYellow);
if(dt[i+fvb] AND H[i+fvb]>=HighMargin) PlotText("2",i+fvb+dxhh+dxhhm,H[i+fvb]+dyhhm,colorRed,colorYellow); 
}
}
if(disp2)
{
Plot(tr,"",ColorRGB(0,100,0),styleHistogram|styleDashed|styleOwnScale|styleNoLabel,0,1,0,0);
Plot(pk,"",ColorRGB(100,0,0),styleHistogram|styleDashed|styleOwnScale|styleNoLabel,0,1,0,0); 
}
Top=pk;
Bottom=tr;
_SECTION_END();
_SECTION_BEGIN( "SUP/RES" );

SetChartOptions(0,chartShowDates);
SetChartBkColor(16);
GraphXSpace=Param("GraphXSpace",10,-100,100,1);
SetBarFillColor(IIf(O>C,24,19));
dtn=DateNum();
haC=EMA((O+H+L+C)/4,3); haO=AMA(Ref(haC,-1),0.5);
haH=Max(H,Max(haC,haO)); haL=Min(L,Min(haC,haO));
_SECTION_BEGIN("Name");
GfxSetOverlayMode(1);
pxh= Status("pxHeight"); pxw=Status("pxWidth");
GfxSelectFont("Tahoma",pxh/8);
GfxSetTextColor(ColorHSB(42,42,42));
GfxSetTextAlign(6); GfxSetBkMode(0);
GfxTextOut(Name(),pxw/2,pxh/12);

GfxSelectFont("Tahoma",pxh/36);
GfxTextOut("",pxw/2,pxh/3);
_SECTION_END();

_SECTION_BEGIN(" ");
fs=Param("font size",10,10,100,1);
GfxSelectFont("french script mt", fs, 700, True ); 
GfxSetBkMode( colorRed ); 
GfxSetTextColor( ParamColor("color",colorYellow) ); 
GfxTextOut("H="+H+" ",340,0); 
GfxTextOut("O="+O+" ",240,0); 
GfxTextOut("L="+L+" ",440,0); GfxTextOut("C="+C+" " ,540,0);

_SECTION_END();



//============== ADX ==============
adxBuy = Cross(PDI(7), MDI(7));
adxSell = Cross(MDI(7), PDI(7));
adxBuy = ExRem(adxBuy, adxSell);
adxSell = ExRem(adxSell, adxBuy);
adxbuy1 = PDI(7) > MDI(7);
adxsell1 = MDI(7)> PDI(7);

//============== TREND ==============
DTL=150; // DTL = Define Trend Long
DTM=70; // DTM = Define Trend Medium
DTS=14; // DTS = Define Trend Short
TL=LinRegSlope(MA(C, DTL),2); // TL = Trend Long
TM=LinRegSlope(MA(C, DTM),2); // TM = Trend Medium
TS=LinRegSlope(MA(C, DTS),2); // TS = Trend Short
TLL=IIf(LinRegSlope(MA(C, DTL),2) > 0,True, False); 
TMM=IIf(LinRegSlope(MA(C, DTM),2) > 0,True, False); 
TSS=IIf(LinRegSlope(MA(C, DTS),2) > 0,True, False);



_SECTION_BEGIN("Automatic Fib Levels");
/*--------------------------------------------------- 
Automatic Fib Levels 
Aron Pipa, December, 11, 2005 
modified by Kook 30 December 2005 
--------------------------------------------------------*/
GraphXSpace=2; 
Plot(C,"", colorBlack,styleCandle|styleNoLabel);
// Get values for fib levels
StartBar=SelectedValue(BarIndex()); 
FinishBar = EndValue( BarIndex() ); 
i = startbar; 
period = FinishBar - StartBar;
Lo =LLV(L,period); 
Hi = HHV(H,period); 
Line0 = 0; 
Line1 = 0; 
Line2 = 0; 
Line3 = 0; 
Line4 = 0; 
Line5 = 0; 
Line6 = 0;
Line7 = 0; 
Line100 = 0;
for( i = startbar; i < finishbar; i++ ) 
{ 
if(EndValue(C)<SelectedValue(C)) 
{ 
Line0 = EndValue(Lo); 
Line100 = EndValue(Hi); 
Line1 = Line0 + abs(Line100-Line0)*0.382; 
Line2 = Line0 + abs(Line100-Line0)*0.5; 
Line3 = Line0 + abs(Line100-Line0)*0.618; 
Line4 = Line0 + abs(Line100-Line0)*0.764; 
Line5 = Line0 + abs(Line100-Line0)*0.236; 
Line6 = Line0 + abs(Line100-Line0)*0.14; 
Line7 = Line0 + abs(Line100-Line0)*0.88; 
} 
else 
{ 
Line100 = EndValue(Lo); 
Line0 = EndValue(Hi); 
Line1 =Line0 - abs(Line100-Line0)*0.382; 
Line2 = Line0 - abs(Line100-Line0)*0.5; 
Line3 = Line0 - abs(Line100-Line0)*0.618; 
Line4 = Line0 - abs(Line100-Line0)*0.764; 
Line5 = Line0 - abs(Line100-Line0)*0.236; 
Line6 = Line0 - abs(Line100-Line0)*0.147; 
Line7 = Line0 - abs(Line100-Line0)*0.88; 
} 
}
// external fib lines begining fom selecetdbarindex() 
fib0= LineArray(startbar, Line0, finishbar, Line0, 0, 1); 
fib100 = LineArray(startbar, Line100, finishbar, Line100, 0, 1);
// depth of middle lines 
n= round((finishbar-startbar)/2);
// middle lines 
fib1= LineArray((finishbar-n), Line1, finishbar, Line1, 0, 1); 
fib2= LineArray((finishbar-n), Line2, finishbar, Line2, 0, 1); 
fib3= LineArray((finishbar-n), Line3, finishbar, Line3, 0, 1); 
fib4= LineArray((finishbar-n), Line4, finishbar, Line4, 0, 1); 
fib5= LineArray((finishbar-n), Line5, finishbar, Line5, 0, 1); 
fib6= LineArray((finishbar-n), Line6, finishbar, Line6, 0, 1); 
fib7= LineArray((finishbar-n), Line7, finishbar, Line7, 0, 1);

Plot(fib0,"", colorWhite,styleDots|styleNoTitle|styleNoLabel); 
Plot(fib100,"", colorWhite,styleDots|styleNoTitle|styleNoLabel); 
Plot(fib1,"38.2%=", colorBrightGreen,32+styleThick|styleNoTitle|styleNoLabel); 
Plot(fib2,"50%=", colorYellow,1+styleThick|styleNoTitle|styleNoLabel); 
Plot(fib3,"61.8%=", colorPink,32+styleThick|styleNoTitle|styleNoLabel); 
Plot(fib4,"76.4%=", colorBrightGreen,32+styleThick|styleNoTitle|styleNoLabel); 
Plot(fib5,"23.6%=", colorTurquoise,32+styleThick|styleNoTitle|styleNoLabel); 
Plot(fib6,"14%=",colorPink,32+styleThick|styleNoTitle|styleNoLabel); 
Plot(fib7,"88%=", colorCustom11,32+styleThick|styleNoTitle|styleNoLabel);
Title = "FIB" + "@ " + Interval(2) + EncodeColor() + " & " + Date()


+"\n"+EncodeColor(colorWhite)+"• Short : "+
WriteIf(TS>0 AND TS<0.3,EncodeColor(colorGreen)+"Weak Up Trend",
WriteIf(TS>=0.3 AND TS<0.6 ,EncodeColor(colorBrightGreen)+"Medium Up Trend", 
WriteIf(TS>=0.6,EncodeColor(colorBrightGreen)+"Strong Up Trend", 
WriteIf(TS<0 AND TS>-0.3,EncodeColor(colorCustom12)+"Weak Down Trend",
WriteIf(TS<=-0.3 AND TS>-0.6 ,EncodeColor(ColorRGB(255,0,128))+"Medium Down Trend",
WriteIf(TS<=-0.6,EncodeColor(colorRed)+"Strong Down Trend",EncodeColor(colorGrey50)+"Sideways"))))))
+EncodeColor(colorWhite)+"• Mid: "+
WriteIf(TM>0 AND TM<0.3,EncodeColor(colorGreen)+"Weak Up Trend",
WriteIf(TM>=0.3 AND TM<0.6 ,EncodeColor(colorBrightGreen)+"Medium Up Trend", 
WriteIf(TM>=0.6,EncodeColor(colorBrightGreen)+"Strong Up Trend", 
WriteIf(TM<0 AND TM>-0.3,EncodeColor(colorCustom12)+"Weak Down Trend",
WriteIf(TM<=-0.3 AND TM>-0.6 ,EncodeColor(ColorRGB(255,0,128))+"Medium Down Trend",
WriteIf(TM<=-0.6,EncodeColor(colorRed)+"Strong Down Trend",EncodeColor(colorGrey50)+"Sideways"))))))
+EncodeColor(colorWhite)+"• Long : "+
WriteIf(TL>0 AND TL<0.3,EncodeColor(colorGreen)+"Weak Up Trend",
WriteIf(TL>=0.3 AND TL<0.6 ,EncodeColor(colorBrightGreen)+"Medium Up Trend", 
WriteIf(TL>=0.6,EncodeColor(colorBrightGreen)+"Strong Up Trend", 
WriteIf(TL<0 AND TL>-0.3,EncodeColor(colorCustom12)+"Weak Down Trend",
WriteIf(TL<=-0.3 AND TL>-0.6 ,EncodeColor(ColorRGB(255,0,128))+"Medium Down Trend",
WriteIf(TL<=-0.6,EncodeColor(colorRed)+"Strong Down Trend",EncodeColor(colorGrey50)+"Sideways"))))))
+EncodeColor(colorGold)+"• Signal(ADX): " + WriteIf(adxBuy,EncodeColor(colorBrightGreen)+"Buy",WriteIf(adxSell,EncodeColor(colorRed)+"Sell",WriteIf(adxBuy1,EncodeColor(colorBrightGreen)+"Bullish",WriteIf(adxSell1,EncodeColor(colorRed)+"Bearish","Neutral"))))

+"\n"+EncodeColor(colorBlue)+"--------------------------------------"
+"\n"+EncodeColor(colorWhite)+ "100%= "+WriteVal(line100,format=1.2)
+"\n"+EncodeColor(colorCustom11)+"89% = "+WriteVal(line7,format=1.2)
+"\n"+EncodeColor(colorBrightGreen)+"76.4% = "+WriteVal(line4,format=1.2)
+"\n"+EncodeColor(colorPink)+"61.8% = "+WriteVal(line3,format=1.2) 
+"\n"+EncodeColor(colorYellow)+"50% = "+WriteVal(line2,format=1.2) 
+"\n"+EncodeColor(colorBrightGreen)+"38.6% = "+WriteVal(line1,format=1.2) 
+"\n"+EncodeColor(colorCustom11)+"23.6%= "+WriteVal(line5,format=1.2)
+"\n"+EncodeColor(colorPink)+"14%%= "+WriteVal(line6,format=1.2) 
+"\n"+EncodeColor(colorWhite)+"0%= "+WriteVal(line0,format=1.2)

;
_SECTION_END();

_SECTION_BEGIN("Average");
P = ParamField("Field");
Type = ParamList("Type", "Weighted,Lagless-21,Hull-26,Linear Regression-45,Exponential,Double Exponential,Tripple Exponential,Wilders,Simple");
Periods = Param("Periods", 9, 2, 100 );
Displacement = Param("Displacement", 1, -50, 50 );
m = 0;
if( Type == "Weighted" ) m= WMA( P, Periods );
if( Type == "Lagless-21" ) m= 2*EMA(P, Periods)-EMA(EMA(P, Periods), Periods); 
if( Type == "Hull-26" ) m= WMA(2*(WMA(P, Periods/2))-WMA(P, Periods) ,4 );
if( Type == "Linear Regression-45" ) m= LinearReg( P, Periods );
if( Type == "Exponential" ) m = EMA( P, Periods );
if( Type == "Double Exponential" ) m = DEMA( P, Periods );
if( Type == "Tripple Exponential" ) m = TEMA( P, Periods );
if( Type == "Wilders" ) m = Wilders( P, Periods );
if( Type == "Simple" ) m = MA( P, Periods );

Plot( m, _DEFAULT_NAME(), ParamColor("Color", colorWhite), styleThick, 0, 0, Displacement );
_SECTION_END();
Buy1=Cross(C,m);
Buy2=Cross(C, Levels[9]);
Buy3=Cross(C, Levels[0]);
Buy=Buy1 OR Buy2 OR Buy3;
Sell1=Cross(m,C);
Sell2=Cross(Levels[9],C);
Sell3=Cross(Levels[0],C);
Sell=Sell1 OR Sell2 OR Sell3;
PlotShapes(IIf(Buy1,shapeSmallUpTriangle,shapeNone),colorCustom12,0,L,-20); 
PlotShapes(IIf(Sell1,shapeSmallDownTriangle, shapeNone),colorYellow,0,H,-20);

_SECTION_BEGIN("Exploration");
Filter=Close;
Var = WriteIf(Buy,"BUY",WriteIf(Sell,"SELL",""));
AddTextColumn( Var , "Buy/Sell", 1.2 , colorWhite, IIf( Buy, colorBlue,IIf(Sell,colorRed,colorWhite) )); 
_SECTION_END();

1 nhận xét:

  1. Chào bạn,
    Bạn vui long nhìn code Fibonacci bị lỗi,
    Bạn vui long gửi lại cho mình xin vào mail cuongth@me.com
    Cảm ơn bạn,

    Trả lờiXóa