Download MetaTrader 5
To add comments, please log in or register
Download MQL5 library codes via MetaTrader. It is convenient!
Automated-Trading
Admin
88374
Automated-Trading 2014.05.22 15:47 

DailyLines:

DailyLines Vertical lines starting new Day with above name of the DAY. Period Separators with options to choose different styles.

Like period Separator each new day will gets its line at starting.

Above this line you can read the text what day of the week is starting. The lines can be dotted, solid , dash ....  and also the width can be chosen. The text is placed pixels you choose from pricemax.

Everytime you change the chart the lines will correct themselves so the output keeps the same. Choosing the first day of the week different color makes you see easily weekly Separators also.

DailyLines

Author: Tjipke de Vries

kate682
147
kate682 2014.05.25 13:35  

This is such a useful indicator, thank you.

All i need now is a monthly separator, i have a weekly one.

Hugs

Kate 

file45
3492
file45 2014.05.25 22:08  

Echo above comment - thanks - but no hugs

Added Text Horizontal / Vertical Option


1

#property indicator_chart_window

enum TA
{
   H, // Text Horizontal
   V  // Text Vertical
};   

input int  MaxBarsToLookBackForSeparators=0;

2

//--- input distance text from top of the chart 
input TA Text_Angle = H; // Select Text Angle
input double          textplace=30;
3
int ta; 
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
{
  switch(Text_Angle)
  {
     case H: ta = 0; break;
     case V: ta = 90; break;
  }

//Set Timer
   EventSetMillisecondTimer(250);

4

if(ObjectFind(0,"DayText "+thisday)<0)
        {
         TextCreate(0,"DayText "+thisday,0,now,textprice,text,InpFont,InpFontSize,
                    clr,ta,InpAnchor,false,false,true,0);
        }
toddanderson
39
toddanderson 2014.06.05 15:01  
Automated-Trading:

DailyLines:

Author: Tjipke de Vries

Thank you for your indicatror

can you please add a GTM offset, so it can be used with differant broker start times

thank you

Mario Trinchero
287
Mario Trinchero 2015.04.08 00:46  

2015.04.08 00:28:35.637 zero divide in 'dailylines.mq4' (46,58)

and the same aat line 97 

 

when i restart the terminal indicator disappears (on screenshot) 

 

 2015.04.08 00:28:35.637 zero divide in 'dailylines.mq4' (46,58)

and the same at line 97 

 

modify line 46 and line 97 

textprice=max_price-((max_price-min_price)*(textplace/heightinpixels));

width 

textprice=max_price-((max_price-min_price)*(textplace/(heightinpixels+1)));

and the indicator no disappears never

/
To add comments, please log in or register