I'm finally trying some programming ! In searching through all the posts and the guides, I have not seen a way to draw a horizontal line, indicating support/resistance at a previous low/high. Preferably using some lookback period (XX), such as "the high for the last XX weeks/days".
Could someone suggest some code that could accomplish this simple task ?
Thanks in advance............
Size:
Color:
Size:
Color:
Eugene, Thanks for the timely response and link to the Wiki !
I had forgotten about the Wiki ? Looking back at the home page you find it at support/knowledge base. There is no obvious upfront link ? 'More reading to be done'
I loaded that code and played with it for awhile. It works great, but it annotates the bar 'NH' at many bars, with the last at [bar - 100]. So I just need to figure out how to assign a value to the high of the last 100 bar period. Then I can draw the 'one' Horizontal line.
Thanks Again
Size:
Color:
What's wrong with the Highest Indicator? It seems to precisely meet the requirements you've described except for "one" horizontal line. Why only "one"?
.. which is easy too.
CODE:
Please log in to see this code.
Size:
Color:
Thanks again for the help with this.
I had the code in a loop and it drew multiple horizontal lines at each high.
The code I have now (still in the loop) is working fine and draws
'one' horizontal line for the high in a lookback period does the same for the low of that lookback period.
CODE:
Please log in to see this code.
Size:
Color:
It is not working. could you post the entire code here like in the link of Eugene's message above. thanks.
Size:
Color:
The Wiki code sample for Highest undoubtedly works 100%.
Size:
Color: