harry_tn
91
harry_tn  

Pivot Indicator - Y's HiLo & B4Y's HiLo

Hi My Dear Friends,

Refer to my early posts on Pivot indicator setting acquired, so for not respond has acted.

Again, I'm posted the following code taken from the existing MT4 file hope someone who able to help to modify and add in the the followings:

1. LocalTimeZone.

2. Vertical line show on Today, yesterday & Beforeyesterday.

3. Pivot Resistance & Support 1, 2 & 3.

Your kind assistant is appreciated.

//+------------------------------------------------------------------+

//| HiLo2DayBefore.mq4 |

//+------------------------------------------------------------------+

#property indicator_chart_window

//+------------------------------------------------------------------+

//| Custom indicator initialization function |

//+------------------------------------------------------------------+

int init()

{

//---- indicators

//----

return(0);

}

//+------------------------------------------------------------------+

//| Custom indicator deinitialization function |

//+------------------------------------------------------------------+

int deinit()

{

//----

//YLow, low of yesterday.

//YHigh, high of yesterday.

//B4YLow, low of before yestersay.

//B4YHigh, high of before yesterday.

//PP, pivot point.

ObjectDelete("YLow");

ObjectDelete("B4YLow");

ObjectDelete("YHigh");

ObjectDelete("B4YHigh");

ObjectDelete("PIVOT");

Comment(" ");

//----

return(0);

}

//+------------------------------------------------------------------+

//| Custom indicator iteration function |

//+------------------------------------------------------------------+

int start()

{

//----

double yesterday_close,yesterday_high,yesterday_low,before_yesterday_close,before_yesterday_high,before_yesterday_low;

yesterday_close = iClose(NULL,PERIOD_D1,1);

yesterday_high = iHigh(NULL,PERIOD_D1,1);

yesterday_low = iLow(NULL,PERIOD_D1,1);

before_yesterday_close = iClose(NULL,PERIOD_D1,2);

before_yesterday_high = iHigh(NULL,PERIOD_D1,2);

before_yesterday_low = iLow(NULL,PERIOD_D1,2);

//---- Calculate Pivots

//Comment("\nYesterday quotations :\nH ",yesterday_high,"\nL ",yesterday_low, "\nC ",yesterday_close,"\n\nBefore yesterday quotations :\nH ",before_yesterday_high,"\nL ",before_yesterday_low, "\nC ",before_yesterday_close);

double pivot = (yesterday_high + yesterday_low + yesterday_close)/3;// Standard Pivot

drawLine(yesterday_low,"YLow", Plum,0);

drawLabel("Low yesterday",yesterday_low,Plum);

drawLine(before_yesterday_low,"B4YLow", Plum,0);

drawLabel("Low before yesterday",before_yesterday_low,Plum);

drawLine(pivot,"PIVOT",Aqua,1);

drawLabel("Pivot level",pivot,Aqua);

drawLine(yesterday_high,"YHigh",CornflowerBlue,0);

drawLabel("High yesterday",yesterday_high,CornflowerBlue);

drawLine(before_yesterday_high,"B4YHigh",CornflowerBlue,0);

drawLabel("High before yesterday",before_yesterday_high,CornflowerBlue);

//----

return(0);

}

//+------------------------------------------------------------------+

void drawLabel(string name,double lvl,color Color)

{

if(ObjectFind(name) != 0)

{

ObjectCreate(name, OBJ_TEXT, 0, Time[10], lvl);

ObjectSetText(name, name, 8, "Arial", EMPTY);

ObjectSet(name, OBJPROP_COLOR, Color);

}

else

{

ObjectMove(name, 0, Time[10], lvl);

}

}

void drawLine(double lvl,string name, color Col,int type)

{

if(ObjectFind(name) != 0)

{

ObjectCreate(name, OBJ_HLINE, 0, Time[0], lvl,Time[0],lvl);

if(type == 1)

ObjectSet(name, OBJPROP_STYLE, STYLE_SOLID);

else

ObjectSet(name, OBJPROP_STYLE, STYLE_DOT);

ObjectSet(name, OBJPROP_COLOR, Col);

ObjectSet(name,OBJPROP_WIDTH,1);

}

else

{

ObjectDelete(name);

ObjectCreate(name, OBJ_HLINE, 0, Time[0], lvl,Time[0],lvl);

if(type == 1)

ObjectSet(name, OBJPROP_STYLE, STYLE_SOLID);

else

ObjectSet(name, OBJPROP_STYLE, STYLE_DOT);

ObjectSet(name, OBJPROP_COLOR, Col);

ObjectSet(name,OBJPROP_WIDTH,1);

}

}

simon rowe
16
simon rowe  

Weekly, Monthly Open Line

Hello All

Does anybody have an indicator like the one below -

for weekly and monthly open price line

with historical -

https://www.mql5.com/en/forum/172894/page13

gsfx
3
gsfx  

hi guy, I wanted to know if there is to know you volatily pivot indicator with alarm. I have not found anything

thanks a lot

[Deleted]  

Pivot Point Indicator

Anyone know where I can get a Pivot Point Indicator that leave last days lines one the chart? The ones I have change the lines daily making it hard to look back on the price action.

Thanks!

Linuxser
5921
Linuxser  
jerzzhere:
Anyone know where I can get a Pivot Point Indicator that leave last days lines one the chart? The ones I have change the lines daily making it hard to look back on the price action. Thanks!

Check out this thread.

gaston
6
gaston  

FiboPiv with Alert

Hi

Does anyone has FiboPiv with alert. That is Alert when price crosses the lines (S/R) . Or can anyone please add the alert. Thanks

Files:
avi1
9428
avi1  
Linuxser:
Check out this thread.

does anyone have historic diag fiv level thx

fazi
14
fazi  

Cam L5 needed

Hi Guys,

Can anyone of You add Cam L5 line to this indicator?

thank you in advance

Patryk

fazi
14
fazi  
fazi:
Hi Guys,

Can anyone of You add Cam L5 line to this indicator?

thank you in advance

Patryk

to be precise - Cam L5 and H5 lines

thanks again

Patryk

yie8504
3
yie8504  

Pivot line suggestion and requirement

hey mate...

i`m newbie in this trading sector.i really need suggestion and recommendation pivot line for support and resistant from senior..

thanks for advanced..