Download MetaTrader 5
To add comments, please log in or register
Having questions? Ask them on the Forum - traders will help you!
grrbear
393
grrbear 2015.04.17 01:52 
hi i use this simple vertical line indicator to mark ny open and close times but i don't want an infinite number of lines on the chart, rather only have 3 or 4 lines at any given time. what can be added to the code to allow me to choose how many lines will be shown? thanks
Files:
Aleksei Beliakov
23805
Aleksei Beliakov 2015.04.17 11:35  
hi buddy you need to add limit in you for operator
grrbear
393
grrbear 2015.04.17 13:26  
goverkms:
hi buddy you need to add limit in you for operator
thanks for the reply, i am not a coder so i would need some help with the code
Vladimir Karputov
Moderator
45448
Vladimir Karputov 2015.04.17 16:37  
grrbear :
thanks for the reply, i am not a coder so i would need some help with the code
Will be drawn four pairs of lines. The number of pairs of lines = 4.
Files:
grrbear
393
grrbear 2015.04.17 16:44  
barabashkakvn:
Will be drawn four pairs of lines. The number of pairs of lines = 4.
thanks! i need lines for ny open and close though
Vladimir Karputov
Moderator
45448
Vladimir Karputov 2015.04.17 17:53  
grrbear :
thanks! i need lines for ny open and close though
You can determine the time - in the indicator settings.
grrbear
393
grrbear 2015.04.17 18:07  
barabashkakvn:
You can determine the time - in the indicator settings.

thanks again. it was showing 10 lines when both open and close were used, i'm guessing 8 plus 2. i changed this line of code from 8 to 2 and now it shows 4 lines(2 + 2):

if(count_lines>2)  // (the number of pairs of lines)*2

the problem now is when i change to lower time frames there are too many lines again, until i change time frames again. this would require me to change the time frame twice in order to get rid of the extra lines each time

/
To add comments, please log in or register