Period separators (MT4) showing Monday

 
Hi - does anyone have or know of an indicator that displays the period separators (CTRL and Y) but the monday separator is a different colour? I'm on a 5 day broker, so can't see monday bars easily. Thanks
 
You have only three choices: Search for it, learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt and the nature of your problem.
 
WHRoeder:
You have only three choices: Search for it, learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt and the nature of your problem.

fair enough. In that case, I can identify mondays by:

DayOfWeek()==1

But I don't know how to place this within the ObjectCreate function below (where the ?? are present):

ObjectCreate("V-Line",OBJ_VLINE,0,??,Bid);

Any ideas? Thanks

 

https://docs.mql4.com/objects   

vertical line    "vline" 

Bid ??? 

not your solution       ObjectCreate("V-Line",OBJ_VLINE,0,Time[0],0);

see also  https://www.mql5.com/en/forum/141268 

 
deVries:

https://docs.mql4.com/objects   

vertical line    "vline" 

Bid ??? 

not your solution       ObjectCreate("V-Line",OBJ_VLINE,0,Time[0],0);

see also  https://www.mql5.com/en/forum/141268 


Thanks for replying. This only shows one vertical line on the current bar but I want the a vertical line for every monday 00:00 bar. I already looked at 51252 thread but the code doesn't even work. Any thoughts?


Thanks again

 
mrchilled:

Thanks for replying. This only shows one vertical line on the current bar but I want the a vertical line for every monday 00:00 bar. I already looked at 51252 thread but the code doesn't even work. Any thoughts?


Thanks again


ofcours I have

but show your attempt

 We are willing to HELP you when you post your attempt and the nature of your problem.

 for posting your code see   This link Play video  

 

for all iBars

  if TimeDayOfWeek(Time[iBar]) == 1 Put a vertical line at Time[iBar]

Now post your attempt and the nature of your problem.
 
WHRoeder:

for all iBars

  if TimeDayOfWeek(Time[iBar]) == 1 Put a vertical line at Time[iBar]

Now post your attempt and the nature of your problem.
I'm with a MT4 broker GMT+2, so the period intervals don't show monday. A previous broker was on GMT and the separators have a double dotted vertical line to show monday starts. I'm trying to create an indicator that shows an orange (or whatever colour) vertical line starting every monday from 00:00 but going back as well.Here is my attempt:


extern color Line.Color=Orange;
extern int Line.Style=1;
extern int Line.Width=1;
extern bool Draw.as.Background=true;

int init()
{return(0);}

//int deinit(){ObjectDelete("V-Line"); return(0);}

int start(){
int iBars("GBPUSD",0);

for all iBars
   if TimeDayOfWeek(Time[iBars]) == 1
//ObjectDelete("V-Line");
ObjectCreate("V-Line",OBJ_VLINE,0,Time[iBars],0);
ObjectSet("V-Line",OBJPROP_COLOR,Line.Color);
ObjectSet("V-Line",OBJPROP_STYLE,Line.Style);
ObjectSet("V-Line",OBJPROP_WIDTH,Line.Width);
ObjectSet("V-Line",OBJPROP_BACK,Draw.as.Background);
return(0);}

 

  1. Play video
    Please edit your post.
    For large amounts of code, attach it.

  2. Post real code. Code that compiles. Code that you have attempted to debug. And then the nature of your problem.
 
//+------------------------------------------------------------------+
//|                                                Vertical Line.mq4 |
//|                              Copyright © 2006, fxid10t@yahoo.com |
//|                               http://www.forexprogramtrading.com |
//+------------------------------------------------------------------+
#property copyright 
#property link      
#property indicator_chart_window

//extern datetime When=D'2013.03.15 10:00';
extern color Line.Color=Orange;
extern int Line.Style=1;
extern int Line.Width=1;
extern bool Draw.as.Background=true;

int init()
{return(0);}

//int deinit(){ObjectDelete("V-Line"); return(0);}

int start(){
int iBars("GBPUSD",0);

for all iBars
   if TimeDayOfWeek(Time[iBars]) == 1 
//ObjectDelete("V-Line");
ObjectCreate("V-Line",OBJ_VLINE,0,Time[iBars],0);
ObjectSet("V-Line",OBJPROP_COLOR,Line.Color);
ObjectSet("V-Line",OBJPROP_STYLE,Line.Style);
ObjectSet("V-Line",OBJPROP_WIDTH,Line.Width);
ObjectSet("V-Line",OBJPROP_BACK,Draw.as.Background);
return(0);}
//+------------------------------------------------------------------+

 
There it is. Thanks
Reason: