Highlighting Round Numbers

dima777

Member
Messages
85
Likes
1
Hi there!
I wonder if you can help me to create a script which will draw horizontal support lines at prespecified price levels. In my case(i am working with the EUR/USD chart) that would be multiples of 100 points ("100" would be the input). With this setting the code would draw horizontal lines at price levels like 1.2300 1.3100 and 1.4500.
Looking forward to hear from you soon!
Dima
 
i'll check when I get to my desk tomorrow, but i'm pretty sure you can do this without even needing any code - just by configuring the appearance of your chart window and the "grid" that is drawn begind the chart
 
thank you for your reply...yes the grid helps but it changes its scaling when you zoom in - or when you reduce the bar spacing....looking forward to hear from you!)..btw i am using TS8.1
 
This is easily done using trendlines. I am not sure exactly what you are wanting though, but the horizontal lines are easy nuff. maybe you can describe exactly what you are wanting. Is this just one line or multiple etc ?
 
Perhaps (if it's anything like MetaTrader), it isn't drawing specific grid lines for round numbers, and something automatic would therefore be useful. I have 5 of them that I move up or down from time to time.
 
This is easily done using trendlines. I am not sure exactly what you are wanting though, but the horizontal lines are easy nuff. maybe you can describe exactly what you are wanting. Is this just one line or multiple etc ?

thanks! i want to have a script which will highlight all instances of round number price levels on a chart based on the input - the pip multiplier....thanks!!!
 
it is ok....i just need to know how this can be done....pip multiplier can always be set to a greater value...)
 
To make a trendline that is horizontal in TS you only need to follow this syntax

value1 = TL_New( {BEGIN LINE}date, time, PlotThisValue, {END LINE}date, time + 1, PlotThisValue ) ;

if you use the same value on each end of this parameter set then the line will be horizontal. You can then extend the line to the right and left and it will go all the way across the screen and then some. You can do a bit of fancier coding and get it to stop at the left and right edges of the visible screen in the newer versions of TS.

So now all you have to do is to determine what to draw and where

PlotThisValue = { Whatever calculation that you need to do to make the line. } ;

The indicator that I put up for you to use will have trendline examples within it that you can use as a guide
 
I am attaching a good example of horizontal lines in an indicator. The floor trader pivots idea.
 

Attachments

  • GBPIVOTS.ELD
    5.1 KB · Views: 235
Top