Hi guys
Could you please advise me about the below case?
i want to draw some VLINE to seperate the whole week in H4 in 3 par
t
could you please advise how can i do that? i can draw fix VLINE with ObjectCreate(), but i dono how can i set it to draw for current week
Where's your codes ... What have you tried?
hi
at the moment i put the date manually
ObjectCreate ("خط عمودي", OBJ_VLINE, 0,D'2014.01.15 00:00',0) ;
The bars are being drawn every Ten_H4 bars ... is that what you're having problems with?
yes i want to draw VLINE every Ten bar, i can make it only appear in H4 then that would be great.
is it possible to draw it only after Bar[1] ??
yes i want to draw VLINE every Ten bar, i can make it only appear in H4 then that would be great.
is it possible to draw it only after Bar[1] ??
- mostafa: i want to draw some VLINE to seperate the whole week in H4 in 3 parWon't work because you use one object name which means one object. You need unique names like name+time.
ObjectCreate ("خط عمودي", OBJ_VLINE, 0,D'2014.01.15 00:00',0) ;
- yes i want to draw VLINE every Ten bar,Not every ten bars. Won't adjust for bars before the week end, nor holidays, nor short Sunday bar (server TZ dependent.)
- i can make it only appear in H4 then that would be great.RTFM. Why ONLY? wouldn't you want them to appear on lower timeframe charts also?
- is it possible to draw it only after Bar[1] ??
iLAST_BAR 2
#define iDIST_BAR 10 // Distance between H4 markers #define iLAST_BAR 0 // Last bar done. datetime H4MarkerLast; void OnInitH4Marker(){ H4MarkerLast=0; } void OnTickH4Marker(){ // Per tick or per bar for(iBar = iBarShift(NULL,0, H4MarkerLast) - 1; iBar >= iLAST_BAR; iBar--){ if(H4MarkerLast == 0) datetime nextSeperator = 0x6FFFFFFF; else nextSeperator = H4MarkerLast + iDIST_BAR * PERIOD_H4 * 60; int dowPre = TimeDayOfWeek( Time[iBar+1] ), dowCur = TimeDayOfWeek( Time[iBar ] ); if(dowCur < dowPre) nextSeperator = Time[iBar]; // Beginning of week. if(Time[iBar] < nextSeperator) continue; H4MarkerLast = Time[iBar]; string name = "خط عمودي" + H4MarkerLast; ObjectCreate (name, OBJ_VLINE, 0, H4MarkerLast,0); ObjectSet(name, OBJPROP_TIMEFRAMES, OBJ_PERIOD_M1 + OBJ_PERIOD_M5 + OBJ_PERIOD_M15 + OBJ_PERIOD_M30 + OBJ_PERIOD_H1 + OBJ_PERIOD_H4); } }Not compiled, not tested.
- mostafa: i want to draw some VLINE to seperate the whole week in H4 in 3 parWon't work because you use one object name which means one object. You need unique names like name+time. [ML] if i understand correctly you mean that i need three object in this way
- yes i want to draw VLINE every Ten bar,Not every ten bars. Won't adjust for bars before the week end, nor holidays, nor short Sunday bar (server TZ dependent.) [ML] you are right if we have a holiday then it doesn't work properly, actually what i need is to divide the current time frame in 3 equal part (time base)
- i can make it only appear in H4 then that would be great.RTFM. Why ONLY? wouldn't you want them to appear on lower timeframe charts also? [ML] In my strategy im analyzing one week (last week), then based on the result i will put my orders in current week.. for confirmation of my weekly analysis i need these lines only appear in H4 (and only for current week) for example enclosed picture
ObjectSet("خط عمودی", OBJPROP_TIMEFRAMES, OBJ_PERIOD_H4);
- is it possible to draw it only after Bar[1] ??
Thanks
Excuse me? Are you hard of reading? You will "try to find a way" I gave you the code. Just call the two functions (one from init, one from start.)
:) yes, and i really appreciate it (i mean it).... im not professional :) i just start few days back ... and understanding your code is little bit hard for me because im newbie :D i dont want to just copy past your code, i have to read lots of thing for each line of your code.
if you found this part of my comment offensive, and I deeply apologize.
:) yes, and i really appreciate it (i mean it).... im not professional :) i just start few days back ... and understanding your code is little bit hard for me because im newbie :D i dont want to just copy past your code, i have to read lots of thing for each line of your code.
if you found this part of my comment offensive, and I deeply apologize.
i dono why i cannot compile your code..

- 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 guys
Could you please advise me about the below case?
i want to draw some VLINE to seperate the whole week in H4 in 3 par
t
could you please advise how can i do that? i can draw fix VLINE with ObjectCreate(), but i dono how can i set it to draw for current week