DYO: Plot a marker in a different horizontal position (1227) |
![]()
Q: I've been experimenting with DYO's a lot and I have
a dynamic marker I would like to put on my simple 3-10 oscillator but am unable
to figure out how. What I would like to do is have a marker that
plots on my 3-10 oscillator line 16 bars ago. This would update itself
every time a new bar prints. When a new bar prints, the old marker will
be deleted and the new marker 16 bars ago will be drawn. There will only
ever be 1 instance of this marker on the indicator which must dynamically move
itself forward on each successive bar that is printed.
Any pointers at all to this would be very greatly appreciated. I know I could
do it with ESPL just by accessing the current offset -1 as I loop through
all the bars, but how to do this with DYO is the question.
A: The following example shows the red markers in their normal positions, and how Lines B and C plot the markers left shifted 10 bars on the chart from the normal positions. This example accomplishes some of your request. I cannot think of an easy way to restrict the markers to a single instance where it would remove the earlier ones plotted.