Hi All,
I want to plot a horizontal line on the chart within the approximate price range.
ie
Note the levels are exactly every 25 points as indicated below.
4825 no plot
.
.
4800 ----------------------------------------------
.
.
4875 -----------------------------------------------
.
actual price @4855
.
4850 ------------------------------------------------
.
.
4825 ------------------------------------------------
.
.
4800 No plot
Thanks,
Neil.
How do I detect the close proximity of the 25 levels to the close price.
I tried using the MOD function ie (close mod 25) +close. Sort of works but I'm missing something.
How to write code for detecting every 25 points
- TJ
- Posts: 7744
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: How to write code for detecting every 25 points
why do you want no plot on 4825 ?
it would be easiest if you simply plot the lines every 25 points, regardless.
it would be easiest if you simply plot the lines every 25 points, regardless.
Re: How to write code for detecting every 25 points
TJ,
I was trying to do this for a few reasons.
1. I thought by only having a few lines on the chart. It would cut down on the resources required. (It all helps, I think).
2. If I was to put lines in every 25 points on a price that is approximately 4800, it would try to scale the whole screen from 0..4800. The price action would be really small.
a) Manually rescaling all of the time would be a a pain in the a...
b) Kind of defeats point 1.
3. I don't think there is 192 (4800/25) plot lines available.
How would you overcome points 2 & 3?
Neil.
I was trying to do this for a few reasons.
1. I thought by only having a few lines on the chart. It would cut down on the resources required. (It all helps, I think).
2. If I was to put lines in every 25 points on a price that is approximately 4800, it would try to scale the whole screen from 0..4800. The price action would be really small.
a) Manually rescaling all of the time would be a a pain in the a...
b) Kind of defeats point 1.
3. I don't think there is 192 (4800/25) plot lines available.
How would you overcome points 2 & 3?
Neil.
- TJ
- Posts: 7744
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: How to write code for detecting every 25 points
you don't have to include the indicator in the price scaling.TJ,
..
2. If I was to put lines in every 25 points on a price that is approximately 4800, it would try to scale the whole screen from 0..4800. The price action would be really small.
a) Manually rescaling all of the time would be a a pain in the a...
b) Kind of defeats point 1.
...
Neil.
right click on chart, select Format Instrument
under Scaling tab, in the General section,
uncheck the box for "Expand Scale to Indicators".
- TJ
- Posts: 7744
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: How to write code for detecting every 25 points
instead of using an indicator to plot the lines,
you can set the label spacing on the chart:
right click on chart, select Format Instrument
under Scaling tab,
check the box for "Set Labels Manually".
set the step size to 25.
right click on chart, select Format Window...
under Background tab,
Check the box for "Show Grid".
Select your grid type and color.
you can set the label spacing on the chart:
right click on chart, select Format Instrument
under Scaling tab,
check the box for "Set Labels Manually".
set the step size to 25.
right click on chart, select Format Window...
under Background tab,
Check the box for "Show Grid".
Select your grid type and color.