if i use this code
ObjectCreate(LineName, OBJ_VLINE, 0,Time[i]+Period()*60, High[0] );
and put the
(extern int BarsAhead=)
to equal 3 the line will be drawn 3 bar befor the last bar in the chart
so what is the problem?any one can help plz
hi ..thanks for u my frind......this what i need
indicator shall draw 1 vertical line from 24.11.2010 00:00 + BarsAhead
' but the startdate and barsahead is avariables that i could change from the indicator settings
ObjectCreate(LineName, OBJ_VLINE, 0,StartTime + (BarsAhead * Period()*60), High[0] );
ho BTW
ObjectDelete(LineName);
& not
ObjectDelete("OBJ_VLINE");
hi
thanks for u qjol for ur help
after using ur code......i enter 20 in the BarsAhead setting but the indicator draw the line after 14 bar......may be because the indicator count the holidays..........
the time frame is daily.......the value for starttime is as in the original code post #1
by the way i removed this part of the code
int D=StartTime; int i=BarsAhead;i=i*10;
because i think it's not useful
because there is 3 weekends between StartTime & StartTime + (BarsAhead * Period()*60) = missing 6 days
hi qjol
i want the indicator to ignore weekend..and count bars only....if i give the indicator a starttime.and 15 in barsahead
the indicator will draw the Vline after 15 bars ignoring the weekend
could that be done in mql4?
hi qjol
i want the indicator to ignore weekend..and count bars only....if i give the indicator a starttime.and 15 in barsahead
the indicator will draw the Vline after 15 bars ignoring the weekend
could that be done in mql4?
of course
u have to find how many weekends u have & add it to BarsAhead * Period()*60

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
hi
am traying to make a simple indicator that put a vertical line after a numbr of bars.....example.....i will enter the date and time and the indicator will draw a vertical line after 25 bar
my code is as follow.......but need some help to finish it......
**************
this is the last code that i arrived at after times of trials
still have a problem with it
if i put 40 in the barsahead setting the indicator will draw the line after 19 bars of the startdate
any help will be welcomed