Is there a way to draw a long vertical line as an object?
Even if a bunch of stacked segments?
Big Be
Vertical Line Code?
- milanese
- TechAdmin
- Posts: 3293
- Joined: Wed Jan 09, 2013 9:02 am
- Location: btr rdx, r8 +
Vertical Line Code?
not sure if I understood your question right, but maybe this helps you ---> http://docs.mql4.com/constants/objectco ... /obj_vlineBig Be » Wed Nov 25, 2015 7:38 pm wrote:Is there a way to draw a long vertical line as an object?
Even if a bunch of stacked segments?
Big Be
Cheers
Tommaso
Global Prime is the official SHF broker 
Searching for Servers and Workstations with individual configuration?
Just PM
Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
Searching for Servers and Workstations with individual configuration?
Just PM
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
-
Big Be
- Trader
- Posts: 52
- Joined: Thu Nov 01, 2012 6:12 pm
Vertical Line Code?
Not quite. I need it to have finite top and bottom ends, adjustable within my program.
Big Be
Big Be
"Big Be"
-
AnotherBrian
Vertical Line Code?
code it as a trendline, just vertical. Turn off "ray".Big Be » Wed Nov 25, 2015 4:37 pm wrote:Not quite. I need it to have finite top and bottom ends, adjustable within my program.
Big Be
-
Big Be
- Trader
- Posts: 52
- Joined: Thu Nov 01, 2012 6:12 pm
Vertical Line Code?
AnotherBrian,AnotherBrian » Wed Nov 25, 2015 5:12 pm wrote:code it as a trendline, just vertical. Turn off "ray".Big Be » Wed Nov 25, 2015 4:37 pm wrote:Not quite. I need it to have finite top and bottom ends, adjustable within my program.
Big Be
Well, you DID answer what I asked!
Unfortunately I did not know enough to refine the questions -
I am trying to add this on top of a grid of objects (similar to a spreadsheet but showing signals icons such as little squares and stars). I want to separate two groups of columns using the vertical line. The existing objects are all referenced to the edge of the window, not to the time or price, which is what the Trendline does.
"Big Be"
- SteveHopwood
- Owner
- Posts: 9904
- Joined: Tue Nov 15, 2011 8:43 am
- Location: Misterton - an insignificant village in England. Very pleasant to live in.
Vertical Line Code?
I am not going to get deeply involved in this because I hate computer graphics, so I merely offer this.
You are looking to draw 'objects' on your chart, so start by investigating OBJPROP
For example, an object is printed on the chart with an x and a y axis. These are set by using the OBJPROP_XDISTANCE and OBJPROP_YDISTANCE.
For example, here is my use in an ea I coded for a client:
where 'name' is the name of the button I created, and 'x, y' are the points on the chart x and y axis, in pixels.
I am probably not explaining this very well because I struggle with it myself. Perhaps it will help you get started - or maybe someone else will come along and help a bit more comprehensively.
I hope you get this sorted out.

You are looking to draw 'objects' on your chart, so start by investigating OBJPROP
For example, an object is printed on the chart with an x and a y axis. These are set by using the OBJPROP_XDISTANCE and OBJPROP_YDISTANCE.
For example, here is my use in an ea I coded for a client:
Code: Select all
ObjectSetInteger(chart_ID,name,OBJPROP_XDISTANCE,x);
ObjectSetInteger(chart_ID,name,OBJPROP_YDISTANCE,y);I am probably not explaining this very well because I struggle with it myself. Perhaps it will help you get started - or maybe someone else will come along and help a bit more comprehensively.
I hope you get this sorted out.
Read the effing manual, ok?
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.
- renexxxx
- Trader
- Posts: 860
- Joined: Sat Dec 31, 2011 3:48 am
Vertical Line Code?
Sorry to get so late to the party ... I've been away. If you want to place vertical lines on the chart, relative to an (x, y) position, and not to a chart time, you can use the OBJ_RECTANGLE_LABEL object. As an example have a look at the attached script. I'm sure you will work out how to draw horizontal lines now.Big Be » Thu Nov 26, 2015 4:43 pm wrote: I am trying to add this on top of a grid of objects (similar to a spreadsheet but showing signals icons such as little squares and stars). I want to separate two groups of columns using the vertical line. The existing objects are all referenced to the edge of the window, not to the time or price, which is what the Trendline does.
Rene.
You do not have the required permissions to view the files attached to this post.
-
Big Be
- Trader
- Posts: 52
- Joined: Thu Nov 01, 2012 6:12 pm
Vertical Line Code?
Thanks Steve,
Thanks renexxxx,
I did find a way to do it by stacking pipe '|' characters.
renexxxx, your script does not give me a line. See attached.
Also, there is no way to remove the graphics from the chart?
Thanks renexxxx,
I did find a way to do it by stacking pipe '|' characters.
renexxxx, your script does not give me a line. See attached.
Also, there is no way to remove the graphics from the chart?
You do not have the required permissions to view the files attached to this post.
"Big Be"
-
AnotherBrian
Vertical Line Code?
ObjectDelete() to remove stuffBig Be » Mon Nov 30, 2015 2:32 pm wrote:Thanks Steve,
Thanks renexxxx,
I did find a way to do it by stacking pipe '|' characters.
renexxxx, your script does not give me a line. See attached.
Also, there is no way to remove the graphics from the chart?
- SteveHopwood
- Owner
- Posts: 9904
- Joined: Tue Nov 15, 2011 8:43 am
- Location: Misterton - an insignificant village in England. Very pleasant to live in.
Vertical Line Code?
Big Be, the brevity of Rene's recent post should lead you to consider the irritation he is feeling.
The script he offered you should contain enough clues as to how you should proceed.
Those of us at SHF who know what we are talking about are mostly glad to help newbies on their way. Having done so, we expect said noobs to do some thinking for them selves.
The previous para was the gentle version of what I am saying.
Here is the blunt version.
Rene has handed on a plate to you the basics of what you need to know. The rest is up to you to find for yourself. Stop being wet and pathetic, and find the stuff you need given the pointers you have from Rene.
This thread is now locked.

The script he offered you should contain enough clues as to how you should proceed.
Those of us at SHF who know what we are talking about are mostly glad to help newbies on their way. Having done so, we expect said noobs to do some thinking for them selves.
The previous para was the gentle version of what I am saying.
Here is the blunt version.
Rene has handed on a plate to you the basics of what you need to know. The rest is up to you to find for yourself. Stop being wet and pathetic, and find the stuff you need given the pointers you have from Rene.
This thread is now locked.
Read the effing manual, ok?
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.