Interacting with user-drawn objects programmatically
Is there a way to interact with user-drawn objects programmatically. For instance I would like to know when the price is near one of the user-drawn Fibonacci levels or a horizontal line.
Thanks for your enthusiasm in terms of PTMC. For the time being API code is under heavy development. Plenty new features are about come out including access to all drawing tools on chart and new alert engine would be perfect to synergy overlapping. Nevertheless, currently are available temporary solutions for notification: first is to build simple indicator which can notify you with basics, such as alerts, prints or sending emails(just like one we have in a code base, use this code and API as reference for your own purposes). Another option (sami manual) is to add conditional alerts in a watchlist with absolute price values, which your horizontal or Fibs line has. Hope this a little bit of help you were seeking! Cheers
Thanks Burhay Vlad.
Just wanted some clarification on the issue. Will your new API (when it comes out) allow me to interact with user-drawn objects? Currently, when I do ObjectsTotal() on a chart with user drawn objects on it, it returns 0. Will the new API return the actual count? How will I be able to choose between separate user-drawn objects and their sub-components, e.g. the different levels on a Fibonacci retracement / expansion, etc.?
If this would be possible in the future then it would be a great step forward.
AminderG, Indeed PTMC DevOps will provide all drawn objects access, presented on chart in new API! Exact mechanism is still under consideration, however assume it will match current GetIndicators () way to interact with multiple indicators on chart! Please stay tuned, we will let you know when API updates are available.