dimanche 17 juillet 2016

fibonacci pivot point

cant find a perfect fibonacci pivot so i make one

PHP Code:

_SECTION_BEGIN("megatrader");
SetChartOptions(0,chartShowArrows|chartShowDates);
GraphXSpace=Param("GraphXSpace",-10,0,100,1);
    
dec = (Param("Decimals",2,0,7,1)/10)+1;
SetChartBkColor(ParamColor("Outer Panel"colorBlack));
SetChartBkGradientFill(ParamColor("Upper Chart"colorDarkGrey), ParamColor("Lower Chart"colorDarkGrey));

Title EncodeColor(55)+  Title Name() + "     " EncodeColor(32) + Date() +
"      " EncodeColor(5) + "  " +
    
EncodeColor(55)+ "     Open = "EncodeColor(52)+ WriteVal(O,dec) +
    
EncodeColor(55)+ "     High = "EncodeColor(5) + WriteVal(H,dec) +
    
EncodeColor(55)+ "      Low = "EncodeColor(32)+ WriteVal(L,dec) +
    
EncodeColor(55)+ "    Close = "EncodeColor(7)+ WriteVal(C,dec)+
    
EncodeColor(55)+ "    Volume = "EncodeColor(11)+ WriteVal(V,1);
///////////////////////
colorHighliter IIf(>= OColorRGB(01280), ColorRGB(12800));
DemandPoint = (Ref(L, -1) < Ref(L, -2)) & (Ref(L, -1)) & (Ref(L1)) & (Ref(L1) < Ref(L2));

//Supply Point
//colorSupplyPoint = ParamColor("Supply Line", ColorRGB(255, 128, 0));
SupplyPoint = (Ref(H, -1) > Ref(H, -2)) & (Ref(H, -1)) & (Ref(H1)) & (Ref(H1) > Ref(H2));

CountTrendBars 0;
CurrentBar BarCount 1;
dx0 dx1 dy0 dy1 0;
sx0 sx1 sy0 sy1 0;
//Price
SetBarFillColor(colorHighliter);
Plot(C"Close"IIf(colorHighliter == ColorRGB(1280128), ColorRGB(2550255), IIf(colorHighliter == ColorRGB(1281280), ColorRGB(2552550), IIf(OColorRGB(02550), IIf(OColorRGB(25500), ColorRGB(255255255))))), styleCandleNullNull001);

Plot(EMA(Close,200),"",colorWhite );




//////////////////////////////////////////////////////////
_SECTION_END();_SECTION_BEGIN("FIBONACCI HIGH PROBABILITY ZONES");

ShowFibHiProbZone=ParamToggle("Show FIb High-Probability Zone","No|Yes",1);
HpzColor ParamColor("Line Color",colorWhite);
Periodicity inDaily;

if(
ShowFibHiProbZone AND Interval()<inHourly)
{
Periodicity inDaily;
}
else if(
ShowFibHiProbZone AND Interval()==inHourly)
{
Periodicity inWeekly;
}
else if (
ShowFibHiProbZone AND Interval()>=inDaily AND Interval()<inMonthly)
{
Periodicity inMonthly;
}
else if(
ShowFibHiProbZone AND Interval()>inWeekly AND Interval()<inYearly)
{
Periodicity inYearly;
}
else 
// Default just to silence the compiler. This will never occur.
{
Hi=Ref(H,-1);
Lo=Ref(L,-1);
Cl=Ref(C,-1);
}
Hi=TimeFrameGetPrice("H",Periodicity,-1);
Lo=TimeFrameGetPrice("L",Periodicity ,-1);
Cl=TimeFrameGetPrice("C",Periodicity ,-1);


p=(Hi+Lo+Cl)/3;

//Bands
as1b=p-((Hi-Lo)*0.382);
as2b=p-((Hi-Lo)*0.618);
as3b=p-((Hi-Lo)*1.000);
as4b=p-((Hi-Lo)*1.382);

ar1b=((Hi-Lo)*0.382)+p;
ar2b=((Hi-Lo)*0.618)+p;
ar3b=((Hi-Lo)*1.000)+p;
ar4b=((Hi-Lo)*1.382)+p;

extnd=0;
sty=styleNoLabel|styleStaircase|styleDashed|styleNoRescale;
Plot(ar1b,"",colorRed,styleDashed,styleNoRescale);
Plot(ar2b,"",colorRed,styleDashed,styleNoRescale);
Plot(ar3b,"",colorRed,styleDashed,styleNoRescale);
Plot(ar4b,"",colorRed,styleDashed,styleNoRescale);

Plot(p,"",colorOrange,styleLine,styleNoRescale);
Plot(as1b,"",colorGreen,styleDashed,styleNoRescale);
Plot(as2b,"",colorGreen,styleDashed,styleNoRescale);
Plot(as3b,"",colorGreen,styleDashed,styleNoRescale);
Plot(as4b,"",colorGreen,styleDashed,styleNoRescale);


///////////////////////
FS=Param("MM Price Font Size",20,11,100,1);
Hor=Param("MM Price Horizontal Position",840,1,1200,1);
Ver=Param("MM price Vertical Position",10,1,830,1); 

  
GfxSelectFont("tahoma"FS700True ); 
   
GfxSetBkMode);  
   
GfxSetTextColorcolorLime); 
   
GfxTextOut(""+CHor+29 Ver);
   
YC=TimeFrameGetPrice("C",inDaily,-1);
   
DD=Prec(C-YC,2);
   
xx=Prec((DD/YC)*100,2);
  
GfxSelectFont("tahoma"11700True ); 
  
GfxSetBkMode);  
  
GfxSetTextColor(7); 
   
GfxTextOut(""+DD+"  ("+xx+"%)"Hor+29 Ver+29 );
//////////////////////////////////////////////////////////
///////////////////////////////////////////// 



fibonacci pivot point

Aucun commentaire:

Enregistrer un commentaire