- Indicator that shows day
- Help needed to this powerful system.
- Period Separator Question
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
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
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
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]
for all iBars
if TimeDayOfWeek(Time[iBar]) == 1 Put a vertical line at Time[iBar]
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);}
Play videoPlease edit your post.
For large amounts of code, attach it.- 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);} //+------------------------------------------------------------------+

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use